jess
Class HasLHS

java.lang.Object
  extended byjess.Node
      extended byjess.HasLHS
All Implemented Interfaces:
Modular, NodeSink, java.io.Serializable, Visitable
Direct Known Subclasses:
Defquery, Defrule

public abstract class HasLHS
extends Node
implements java.io.Serializable, Visitable, Modular, NodeSink

Parent class of Defrules and Defqueries.

(C) 1997 Ernest J. Friedman-Hill and Sandia National Laboratories

Author:
Ernest J. Friedman-Hill
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jess.Node
LEFT, m_usecount, RIGHT
 
Method Summary
abstract  java.lang.Object accept(Visitor jv)
           
 void addNode(Node n)
           
 ConditionalElement getConditionalElements()
          Consider this ConditionalElement to be READ ONLY!
 java.lang.String getDisplayName()
          Fetch the display name of this construct
 java.lang.String getDocstring()
          Get the documentation string for this construct.
 int getGroupSize()
          Fetch the number of elenments on the LHS of this construct.
 java.lang.String getModule()
           
 java.lang.String getName()
          Fetch the name of this construct
 int getNodeIndexHash()
          Get the node-index-hash setting of this construct.
 int getPatternCount()
           
 java.lang.String listNodes()
          Return a string (useful for debugging) describing all the Rete network nodes connected to this construct.
 void setNodeIndexHash(int h)
          Set the node-index-hash of this construct.
 
Methods inherited from class jess.Node
addJessListener, getSuccessors, removeJessListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGroupSize

public int getGroupSize()
Fetch the number of elenments on the LHS of this construct.

Returns:
The number of CEs

getConditionalElements

public ConditionalElement getConditionalElements()
Consider this ConditionalElement to be READ ONLY!


listNodes

public java.lang.String listNodes()
Return a string (useful for debugging) describing all the Rete network nodes connected to this construct.

Specified by:
listNodes in interface NodeSink
Returns:
A textual description of all the nodes used by this construct

getPatternCount

public int getPatternCount()

addNode

public void addNode(Node n)
             throws JessException
Specified by:
addNode in interface NodeSink
Throws:
JessException

setNodeIndexHash

public void setNodeIndexHash(int h)
Set the node-index-hash of this construct. The node-index-hash value effects the indexing efficiency of the join nodes for this construct. Larger values will make constructs with many partial matches faster (to a point). Must be set before construct is added to engine (so is typically set during parsing via the equivalent Jess command.

Parameters:
h - The node index hash value

getNodeIndexHash

public int getNodeIndexHash()
Get the node-index-hash setting of this construct.

Returns:
The node-index-hash of this construct

getName

public final java.lang.String getName()
Fetch the name of this construct

Specified by:
getName in interface Modular
Returns:
The name of this construct

getDisplayName

public java.lang.String getDisplayName()
Fetch the display name of this construct

Returns:
The display name of this construct

getDocstring

public final java.lang.String getDocstring()
Get the documentation string for this construct.

Returns:
The docstring for this construct

accept

public abstract java.lang.Object accept(Visitor jv)
Specified by:
accept in interface Visitable

getModule

public java.lang.String getModule()
Specified by:
getModule in interface Modular

© 2001 E.J. Friedman-Hill and Sandia Corporation