public class Condition
extends java.lang.Object
AiHeuristicConst
.EQ
, GT
, etc. and the
evaluator is a SimpleMathCompare
.Modifier and Type | Field and Description |
---|---|
protected SimpleMathCompare |
mathCompare
The match comparison
|
java.lang.String |
op
The math operator.
|
java.lang.Object |
value
The comparison value.
|
java.lang.String |
valueType
One of the simple data types.
|
Constructor and Description |
---|
Condition()
Create a new instance of Condition.
|
Condition(java.lang.String thisValueType,
java.lang.String thisOp,
java.lang.Object thisValue)
Create a new instance of Condition.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareWith(java.lang.Object comp)
Use the condition to make a math comparison with the input object.
|
static Condition |
falseCondition()
Get a boolean 'false' condition.
|
java.lang.String |
toString()
Create and return a string-based description of this Condition object.
|
static Condition |
trueCondition()
Get a boolean 'true' condition.
|
public java.lang.String valueType
public java.lang.String op
public java.lang.Object value
protected SimpleMathCompare mathCompare
public Condition() throws java.lang.Exception
java.lang.Exception
- any error.public Condition(java.lang.String thisValueType, java.lang.String thisOp, java.lang.Object thisValue) throws java.lang.Exception
thisValueType
- the value type.thisOp
- the operator - can be null.thisValue
- the value as a string.java.lang.Exception
- any error.public boolean compareWith(java.lang.Object comp)
comp
- the object to compare with, as in comp op value
.public static Condition trueCondition() throws java.lang.Exception
java.lang.Exception
- any error.public static Condition falseCondition() throws java.lang.Exception
java.lang.Exception
- any error.public java.lang.String toString()
toString
in class java.lang.Object