Package org.evrete.api
Interface Evaluator
-
- All Superinterfaces:
ValuesPredicate
- All Known Subinterfaces:
LiteralEvaluator
public interface Evaluator extends ValuesPredicate
An internal representation of every condition in the rule engine.
-
-
Field Summary
Fields Modifier and Type Field Description static intRELATION_EQUALSstatic intRELATION_INVERSEstatic intRELATION_NONE
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default intcompare(Evaluator other)FieldReference[]descriptor()Describes fields and their ordering to be used during the evaluationdefault booleansameDescriptor(Evaluator other)default Object[]toArray(IntToValue values)A convenience method to convert evaluator's arguments to object array.-
Methods inherited from interface org.evrete.api.ValuesPredicate
test
-
-
-
-
Field Detail
-
RELATION_NONE
static final int RELATION_NONE
- See Also:
- Constant Field Values
-
RELATION_EQUALS
static final int RELATION_EQUALS
- See Also:
- Constant Field Values
-
RELATION_INVERSE
static final int RELATION_INVERSE
- See Also:
- Constant Field Values
-
-
Method Detail
-
descriptor
FieldReference[] descriptor()
Describes fields and their ordering to be used during the evaluation
- Returns:
- fields in correct order
-
compare
default int compare(Evaluator other)
- Parameters:
other- predicate- Returns:
- positive integer (>0) if predicates are logically the same, negative integer (<0) if predicates are logically inverted (like a == 2 and a != 2) zero (0) if there is no knowledge about the two or if they are independent
-
toArray
default Object[] toArray(IntToValue values)
A convenience method to convert evaluator's arguments to object array.
- Parameters:
values- evaluator's arguments as a functional interface- Returns:
- arguments as an array
-
sameDescriptor
default boolean sameDescriptor(Evaluator other)
-
-