|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jess.Pattern
A Pattern represents a single conditional element on a rule LHS. A Pattern consists mainly of a two-dimensional array of Test1 structures. Each Test1 contains information about a specific characteristic of a slot.
Most users will not use this class directly, but you could use it to build rules directly in the Java language.
(C) 2005 Sandia National Laboratories
Constructor Summary | |
Pattern(Deftemplate deft)
|
|
Pattern(java.lang.String name,
Rete engine)
|
Method Summary | |
java.lang.Object |
accept(Visitor jv)
A proper accept() implementation should call one of the visitXXX() methods on the Visitor. |
void |
addDirectlyMatchedVariables(java.util.Set set)
|
void |
addTest(java.lang.String slotname,
Test1 aTest)
Add a test to this pattern |
void |
addToGroup(Group g)
|
jess.ConditionalElementX |
canonicalize()
|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object o)
|
void |
findVariableDefinitions(int startIndex,
java.util.Hashtable bindingsSoFar,
java.util.Hashtable newBindings)
|
java.lang.String |
getBackchainingTemplateName()
|
boolean |
getBackwardChaining()
|
java.lang.String |
getBoundName()
|
ConditionalElement |
getConditionalElement(int i)
|
jess.ConditionalElementX |
getConditionalElementX(int i)
|
Deftemplate |
getDeftemplate()
|
boolean |
getExplicit()
|
int |
getGroupSize()
|
boolean |
getLogical()
|
java.lang.String |
getName()
|
java.lang.String |
getNameWithoutBackchainingPrefix()
|
boolean |
getNegated()
Is this pattern a (not()) CE pattern, possibly nested? |
int |
getNMultifieldsInSlot(int slot)
|
int |
getNSlots()
|
int |
getNTests(int slot)
|
int |
getPatternCount()
|
int |
getSlotLength(int slot)
|
Test1 |
getTest(int slot,
int test)
|
boolean |
isBackwardChainingTrigger()
|
boolean |
isGroup()
|
boolean |
isMultifieldSubslot(int slot,
int subslot)
|
void |
recordTestedSlots(int factIndex,
java.util.Set testedSlots)
|
void |
renameUnmentionedVariables(java.util.Set set,
java.util.Map substitutes,
int size)
|
void |
setBoundName(java.lang.String s)
|
void |
setExplicit()
|
void |
setLogical()
|
void |
setNegated()
|
void |
setSlotLength(java.lang.String slotname,
int length)
Set the length of a multislot within a pattern |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Pattern(java.lang.String name, Rete engine) throws JessException
public Pattern(Deftemplate deft)
Method Detail |
public java.lang.Object clone()
clone
in interface jess.ConditionalElementX
public void setSlotLength(java.lang.String slotname, int length) throws JessException
JessException
public void addTest(java.lang.String slotname, Test1 aTest) throws JessException
JessException
public void addDirectlyMatchedVariables(java.util.Set set) throws JessException
addDirectlyMatchedVariables
in interface jess.ConditionalElementX
JessException
public void renameUnmentionedVariables(java.util.Set set, java.util.Map substitutes, int size) throws JessException
renameUnmentionedVariables
in interface jess.ConditionalElementX
JessException
public void recordTestedSlots(int factIndex, java.util.Set testedSlots)
recordTestedSlots
in interface jess.ConditionalElementX
public void findVariableDefinitions(int startIndex, java.util.Hashtable bindingsSoFar, java.util.Hashtable newBindings) throws JessException
findVariableDefinitions
in interface jess.ConditionalElementX
JessException
public boolean getNegated()
getNegated
in interface jess.ConditionalElementX
public void setNegated()
setNegated
in interface jess.ConditionalElementX
public void setLogical()
setLogical
in interface jess.ConditionalElementX
public boolean getLogical()
getLogical
in interface jess.ConditionalElementX
public void setExplicit()
setExplicit
in interface jess.ConditionalElementX
public boolean getExplicit()
public boolean getBackwardChaining()
getBackwardChaining
in interface jess.ConditionalElementX
public java.lang.String getName()
getName
in interface ConditionalElement
public void setBoundName(java.lang.String s) throws JessException
setBoundName
in interface jess.ConditionalElementX
JessException
public java.lang.String getBoundName()
getBoundName
in interface ConditionalElement
public int getNSlots()
public int getNTests(int slot)
public int getSlotLength(int slot)
public int getNMultifieldsInSlot(int slot)
public boolean isMultifieldSubslot(int slot, int subslot)
public Test1 getTest(int slot, int test)
public Deftemplate getDeftemplate()
public void addToGroup(Group g) throws JessException
addToGroup
in interface jess.ConditionalElementX
JessException
public jess.ConditionalElementX canonicalize()
canonicalize
in interface jess.ConditionalElementX
public java.lang.Object accept(Visitor jv)
Visitable
accept
in interface Visitable
jv
- a visitor to invoke
public int getGroupSize()
getGroupSize
in interface ConditionalElement
public boolean isGroup()
isGroup
in interface ConditionalElement
public ConditionalElement getConditionalElement(int i)
getConditionalElement
in interface ConditionalElement
public int getPatternCount()
getPatternCount
in interface jess.ConditionalElementX
public jess.ConditionalElementX getConditionalElementX(int i)
getConditionalElementX
in interface jess.ConditionalElementX
public boolean equals(java.lang.Object o)
public boolean isBackwardChainingTrigger()
isBackwardChainingTrigger
in interface jess.ConditionalElementX
public java.lang.String getBackchainingTemplateName()
public java.lang.String getNameWithoutBackchainingPrefix()
public java.lang.String toString()
|
© 2006 Sandia Corporation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |