jess
Class Pattern
java.lang.Object
|
+--jess.Pattern
- public class Pattern
- extends java.lang.Object
- implements jess.Groupable, java.io.Serializable
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.
(C) 1997 Ernest J. Friedman-Hill and Sandia National Laboratories
- Author:
- Ernest J. Friedman-Hill
- See Also:
- Serialized Form
|
Constructor Summary |
Pattern(java.lang.String name,
Rete engine,
int negcnt)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Pattern
public Pattern(java.lang.String name,
Rete engine,
int negcnt)
throws JessException
size
public int size()
- Returns:
- The number of slots in this pattern's Deftemplate
setSlotLength
public void setSlotLength(java.lang.String slotname,
int length)
throws JessException
- Set the length of a multislot within a pattern
addTest
public void addTest(java.lang.String slotname,
Test1 aTest)
throws JessException
- Add a test to this pattern
getNegated
public int getNegated()
- Is this pattern a (not()) CE pattern, possibly nested?
setUnique
public void setUnique()
- Specified by:
- setUnique in interface jess.Groupable
getUnique
public boolean getUnique()
setExplicit
public void setExplicit(boolean exp)
- Specified by:
- setExplicit in interface jess.Groupable
getExplicit
public boolean getExplicit()
getName
public java.lang.String getName()
- Specified by:
- getName in interface jess.Groupable
setBoundName
public void setBoundName(java.lang.String s)
throws JessException
- Specified by:
- setBoundName in interface jess.Groupable
getBoundName
public java.lang.String getBoundName()
getNSlots
public int getNSlots()
getNTests
public int getNTests(int slot)
getSlotLength
public int getSlotLength(int slot)
getNMultifieldsInSlot
public int getNMultifieldsInSlot(int slot)
isMultifieldSubslot
public boolean isMultifieldSubslot(int slot,
int subslot)
getTest
public Test1 getTest(int slot,
int test)
getDeftemplate
public Deftemplate getDeftemplate()
addToLHS
public void addToLHS(HasLHS l)
throws JessException
- Specified by:
- addToLHS in interface jess.Groupable
simplify
public jess.Groupable[] simplify()
- Specified by:
- simplify in interface jess.Groupable
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object