jess
Class HasLHS

java.lang.Object
  |
  +--jess.Node
        |
        +--jess.HasLHS
All Implemented Interfaces:
Modular, java.io.Serializable, Visitable
Direct Known Subclasses:
Defquery, Defrule

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

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

Fields inherited from class jess.Node
LEFT, m_usecount, RIGHT
 
Method Summary
abstract  java.lang.Object accept(Visitor jv)
           
 java.lang.String getDisplayName()
          Fetch the display name of this construct
 java.lang.String getDocstring()
          Get the documentation string for 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 getNPatterns()
          Fetch the number of patterns on the LHS of this construct.
 Pattern getPattern(int idx)
          Return the idx-th Pattern on this construct's LHS.
 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

getNPatterns

public int getNPatterns()
Fetch the number of patterns on the LHS of this construct.
Returns:
The number of patterns

getPattern

public Pattern getPattern(int idx)
Return the idx-th Pattern on this construct's LHS.
Parameters:
idx - The zero-based index of the desired pattern
Returns:
the pattern

listNodes

public java.lang.String listNodes()
Return a string (useful for debugging) describing all the Rete network nodes connected to this construct.
Returns:
A textual description of all the nodes used by this construct

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

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