jess
Class Group

java.lang.Object
  extended by jess.Group
All Implemented Interfaces:
java.io.Serializable, ConditionalElement, Visitable

public class Group
extends java.lang.Object
implements ConditionalElement, java.io.Serializable, Visitable

A group of patterns on the LHS of a rule, like an "and", "or", "not", "accumulate", or other special CE.

(C) 2013 Sandia Corporation

See Also:
Serialized Form

Field Summary
static java.lang.String ACCUMULATE
           
static java.lang.String AND
           
static java.lang.String EXISTS
           
static java.lang.String EXPLICIT
           
static java.lang.String FORALL
           
static java.lang.String LOGICAL
           
static java.lang.String NOT
           
static java.lang.String OR
           
static java.lang.String TEST
           
static java.lang.String UNIQUE
           
 
Constructor Summary
Group(java.lang.String name)
           
 
Method Summary
 java.lang.Object accept(Visitor v)
          A proper accept() implementation should call one of the visitXXX() methods on the Visitor.
 jess.ConditionalElementX add(ConditionalElement g)
           
 jess.ConditionalElementX add(jess.ConditionalElementX newChild)
          One important thing to note here is that the actual argument should be considered "dead" after calling this method.
 void addDirectlyMatchedVariables(java.util.Set set)
           
 void addToGroup(Group g)
           
 jess.ConditionalElementX canonicalize()
           
 java.lang.Object clone()
           
 void findVariableDefinitions(int startIndex, java.util.Map bindingsSoFar, java.util.Map newBindings)
           
 boolean getBackwardChaining()
           
 java.lang.String getBoundName()
           
 ConditionalElement getConditionalElement(int i)
           
 jess.ConditionalElementX getConditionalElementX(int i)
           
 int getGroupSize()
           
 boolean getLogical()
           
 java.lang.String getName()
           
 boolean getNegated()
           
 int getPatternCount()
           
 boolean isBackwardChainingTrigger()
           
 boolean isGroup()
           
static boolean isNegatedName(java.lang.String s)
           
 void recordTestedSlots(java.util.Set testedSlots)
           
 int renameUnmentionedVariables(java.util.Set set, java.util.Map subs, int sequenceNumber, java.lang.String groupPrefix)
           
 void setBoundName(java.lang.String name)
           
 void setExplicit()
           
 void setLogical()
           
 void setNegated()
           
 java.lang.String toString()
           
 void transformOrConjunctionsIntoOrFuncalls(int startIndex, java.util.Map bindings, Rete engine)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

AND

public static final java.lang.String AND
See Also:
Constant Field Values

UNIQUE

public static final java.lang.String UNIQUE
See Also:
Constant Field Values

EXPLICIT

public static final java.lang.String EXPLICIT
See Also:
Constant Field Values

NOT

public static final java.lang.String NOT
See Also:
Constant Field Values

EXISTS

public static final java.lang.String EXISTS
See Also:
Constant Field Values

TEST

public static final java.lang.String TEST
See Also:
Constant Field Values

OR

public static final java.lang.String OR
See Also:
Constant Field Values

LOGICAL

public static final java.lang.String LOGICAL
See Also:
Constant Field Values

FORALL

public static final java.lang.String FORALL
See Also:
Constant Field Values

ACCUMULATE

public static final java.lang.String ACCUMULATE
See Also:
Constant Field Values
Constructor Detail

Group

public Group(java.lang.String name)
      throws JessException
Throws:
JessException
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

getName

public java.lang.String getName()
Specified by:
getName in interface ConditionalElement

getPatternCount

public int getPatternCount()

add

public final jess.ConditionalElementX add(ConditionalElement g)
                                   throws JessException
Throws:
JessException

add

public final jess.ConditionalElementX add(jess.ConditionalElementX newChild)
                                   throws JessException
One important thing to note here is that the actual argument should be considered "dead" after calling this method. You can't add group A to group B, then add children to A; you must fully build A, then add it to B.

Throws:
JessException

getBackwardChaining

public boolean getBackwardChaining()

setExplicit

public void setExplicit()
                 throws JessException
Throws:
JessException

setLogical

public void setLogical()
                throws JessException
Throws:
JessException

getLogical

public boolean getLogical()

getNegated

public boolean getNegated()

setNegated

public void setNegated()
                throws JessException
Throws:
JessException

setBoundName

public void setBoundName(java.lang.String name)
                  throws JessException
Throws:
JessException

getBoundName

public java.lang.String getBoundName()
Specified by:
getBoundName in interface ConditionalElement

isNegatedName

public static boolean isNegatedName(java.lang.String s)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

canonicalize

public jess.ConditionalElementX canonicalize()
                                      throws JessException
Throws:
JessException

addToGroup

public void addToGroup(Group g)
                throws JessException
Throws:
JessException

getGroupSize

public int getGroupSize()
Specified by:
getGroupSize in interface ConditionalElement

isGroup

public boolean isGroup()
Specified by:
isGroup in interface ConditionalElement

getConditionalElement

public ConditionalElement getConditionalElement(int i)
Specified by:
getConditionalElement in interface ConditionalElement

getConditionalElementX

public jess.ConditionalElementX getConditionalElementX(int i)

addDirectlyMatchedVariables

public void addDirectlyMatchedVariables(java.util.Set set)
                                 throws JessException
Throws:
JessException

renameUnmentionedVariables

public int renameUnmentionedVariables(java.util.Set set,
                                      java.util.Map subs,
                                      int sequenceNumber,
                                      java.lang.String groupPrefix)
                               throws JessException
Throws:
JessException

recordTestedSlots

public void recordTestedSlots(java.util.Set testedSlots)
                       throws JessException
Throws:
JessException

isBackwardChainingTrigger

public boolean isBackwardChainingTrigger()

accept

public java.lang.Object accept(Visitor v)
Description copied from interface: Visitable
A proper accept() implementation should call one of the visitXXX() methods on the Visitor.

Specified by:
accept in interface Visitable
Parameters:
v - a visitor to invoke
Returns:
whatever the invoked Visitor method returns.

findVariableDefinitions

public void findVariableDefinitions(int startIndex,
                                    java.util.Map bindingsSoFar,
                                    java.util.Map newBindings)
                             throws JessException
Throws:
JessException

transformOrConjunctionsIntoOrFuncalls

public void transformOrConjunctionsIntoOrFuncalls(int startIndex,
                                                  java.util.Map bindings,
                                                  Rete engine)
                                           throws JessException
Throws:
JessException

© 2013 Sandia Corporation