org.drools.spi
Interface Evaluator
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- BaseEvaluator
- public interface Evaluator
- extends java.io.Serializable
-
|
Method Summary |
boolean |
evaluate(java.lang.Object object1,
java.lang.Object object2)
This method will apply the evaluator on the objects.
|
int |
getOperator()
|
int |
getType()
|
EQUAL
public static final int EQUAL
- See Also:
- Constant Field Values
NOT_EQUAL
public static final int NOT_EQUAL
- See Also:
- Constant Field Values
LESS
public static final int LESS
- See Also:
- Constant Field Values
LESS_OR_EQUAL
public static final int LESS_OR_EQUAL
- See Also:
- Constant Field Values
GREATER
public static final int GREATER
- See Also:
- Constant Field Values
GREATER_OR_EQUAL
public static final int GREATER_OR_EQUAL
- See Also:
- Constant Field Values
CONTAINS
public static final int CONTAINS
- See Also:
- Constant Field Values
MATCHES
public static final int MATCHES
- See Also:
- Constant Field Values
EXCLUDES
public static final int EXCLUDES
- See Also:
- Constant Field Values
CHAR_TYPE
public static final int CHAR_TYPE
- See Also:
- Constant Field Values
BYTE_TYPE
public static final int BYTE_TYPE
- See Also:
- Constant Field Values
SHORT_TYPE
public static final int SHORT_TYPE
- See Also:
- Constant Field Values
INTEGER_TYPE
public static final int INTEGER_TYPE
- See Also:
- Constant Field Values
LONG_TYPE
public static final int LONG_TYPE
- See Also:
- Constant Field Values
FLOAT_TYPE
public static final int FLOAT_TYPE
- See Also:
- Constant Field Values
DOUBLE_TYPE
public static final int DOUBLE_TYPE
- See Also:
- Constant Field Values
BOOLEAN_TYPE
public static final int BOOLEAN_TYPE
- See Also:
- Constant Field Values
STRING_TYPE
public static final int STRING_TYPE
- See Also:
- Constant Field Values
DATE_TYPE
public static final int DATE_TYPE
- See Also:
- Constant Field Values
ARRAY_TYPE
public static final int ARRAY_TYPE
- See Also:
- Constant Field Values
OBJECT_TYPE
public static final int OBJECT_TYPE
- See Also:
- Constant Field Values
NULL_TYPE
public static final int NULL_TYPE
- See Also:
- Constant Field Values
getType
public int getType()
getOperator
public int getOperator()
evaluate
public boolean evaluate(java.lang.Object object1,
java.lang.Object object2)
- This method will apply the evaluator on the objects.
Typically, they follow this form:
Fact(object1 operator object2)
Where operator selects the appropraite concrete evaluator, and object1, and object2
are parameters to this method.
So Person(age < 42) will have object1==age field (of the Person fact object)
and "42" will be the object2 value.