jess
Class Test1
java.lang.Object
|
+--jess.Test1
- All Implemented Interfaces:
- java.lang.Cloneable, java.io.Serializable, Test, Visitable
- public final class Test1
- extends java.lang.Object
- implements Test, java.io.Serializable, Visitable, java.lang.Cloneable
Holds a single test in a Pattern on the LHS of a Rule.
(C) 1998 E.J. Friedman-Hill and the Sandia Corporation
- Author:
- Ernest J. Friedman-Hill
- See Also:
- Serialized Form
Fields inherited from interface jess.Test |
EQ, NEQ |
Constructor Summary |
Test1(int test,
int sub_idx,
Value slot_value,
int conjunction)
Create a single test. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Test1
public Test1(int test,
int sub_idx,
Value slot_value,
int conjunction)
throws JessException
- Create a single test.
- Parameters:
test
- Test.EQ or Test.NEQsub_idx
- The subfield of a multislot, or -1slot_value
- An object test againstconjunction
- RU.AND or RU.OR- Throws:
JessException
- If something goes wrong
clone
public java.lang.Object clone()
- Overrides:
clone
in class java.lang.Object
getTest
public int getTest()
getValue
public Value getValue()
getMultislotIndex
public int getMultislotIndex()
doTest
public boolean doTest(Context context)
throws JessException
- Description copied from interface:
Test
- Perform the actual test. The context argument contains all relevant information
needed to resolve variables, etc.
- Specified by:
doTest
in interface Test
- Following copied from interface:
jess.Test
- Parameters:
context
- The execution context in which to evaluate the test- Returns:
- The result of the test
- Throws:
JessException
- If anything goes wrong
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
accept
public java.lang.Object accept(Visitor jv)
- Specified by:
accept
in interface Visitable
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object