jess
Class Pattern

java.lang.Object
  |
  +--jess.Pattern

public class Pattern
extends java.lang.Object
implements java.io.Serializable

Pattern represents a single conditional elemebnt 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)
          Constructor.
 
Method Summary
 void addTest(java.lang.String slotname, Test1 aTest)
          Add a value to this pattern
 java.lang.String getBoundName()
           
 Deftemplate getDeftemplate()
           
 boolean getExplicit()
           
 java.lang.String getName()
           
 int getNegated()
          Is this pattern a (not()) CE pattern, possibly nested?
 int getNSlots()
           
 int getNTests(int slot)
           
 int getSlotLength(int slot)
           
 Test1 getTest(int slot, int test)
           
 boolean getUnique()
           
 void setBoundName(java.lang.String s)
           
 void setMultislotLength(java.lang.String slotname, int length)
          set the length of a multislot within a pattern
 int size()
           
 java.lang.String toString()
          Describe myself
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pattern

public Pattern(java.lang.String name,
               Rete engine,
               int negcnt)
        throws JessException
Constructor.
Parameters:
name -  
engine -  
negcnt -  
Throws:
JessException -  
Method Detail

size

public int size()
Returns:
The number of slots in this pattern's Deftemplate

setMultislotLength

public void setMultislotLength(java.lang.String slotname,
                               int length)
                        throws JessException
set the length of a multislot within a pattern
Parameters:
slotname -  
length -  
Throws:
JessException -  

addTest

public void addTest(java.lang.String slotname,
                    Test1 aTest)
             throws JessException
Add a value to this pattern
Parameters:
slotname -  
aTest -  
Throws:
JessException -  

getNegated

public int getNegated()
Is this pattern a (not()) CE pattern, possibly nested?
Returns:
 

getUnique

public boolean getUnique()
Returns:
 

getExplicit

public boolean getExplicit()
Returns:
 

getName

public java.lang.String getName()
Returns:
 

setBoundName

public void setBoundName(java.lang.String s)
                  throws JessException
Parameters:
s -  
Throws:
JessException -  

getBoundName

public java.lang.String getBoundName()
Returns:
 

getNSlots

public int getNSlots()
Returns:
 

getNTests

public int getNTests(int slot)
Parameters:
slot -  
Returns:
 

getSlotLength

public int getSlotLength(int slot)
Parameters:
slot -  
Returns:
 

getTest

public Test1 getTest(int slot,
                     int test)
Parameters:
slot -  
test -  
Returns:
 

getDeftemplate

public Deftemplate getDeftemplate()
Returns:
 

toString

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

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