Package org.drools.core.base
Class BaseEvaluator
- java.lang.Object
-
- org.drools.core.base.BaseEvaluator
-
- All Implemented Interfaces:
Externalizable
,Serializable
,Evaluator
,org.kie.api.runtime.rule.Evaluator
- Direct Known Subclasses:
CoincidesEvaluatorDefinition.CoincidesEvaluator
,DuringEvaluatorDefinition.DuringEvaluator
,FinishedByEvaluatorDefinition.FinishedByEvaluator
,FinishesEvaluatorDefinition.FinishesEvaluator
,IncludesEvaluatorDefinition.IncludesEvaluator
,MatchesEvaluatorsDefinition.StringMatchesEvaluator
,MatchesEvaluatorsDefinition.StringNotMatchesEvaluator
,MeetsEvaluatorDefinition.MeetsEvaluator
,MetByEvaluatorDefinition.MetByEvaluator
,OverlappedByEvaluatorDefinition.OverlappedByEvaluator
,OverlapsEvaluatorDefinition.OverlapsEvaluator
,PointInTimeEvaluator
,SetEvaluatorsDefinition.ArrayContainsEvaluator
,SetEvaluatorsDefinition.ArrayExcludesEvaluator
,SetEvaluatorsDefinition.BaseMemberOfEvaluator
,SetEvaluatorsDefinition.BaseNotMemberOfEvaluator
,SetEvaluatorsDefinition.ObjectContainsEvaluator
,SetEvaluatorsDefinition.ObjectExcludesEvaluator
,SoundslikeEvaluatorsDefinition.StringNotSoundsLikeEvaluator
,SoundslikeEvaluatorsDefinition.StringSoundsLikeEvaluator
,StartedByEvaluatorDefinition.StartedByEvaluator
,StartsEvaluatorDefinition.StartsEvaluator
,StrEvaluatorDefinition.StrEvaluator
public abstract class BaseEvaluator extends Object implements Evaluator, Externalizable
BaseEvaluator is an Object Comparator that is operator aware- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseEvaluator()
BaseEvaluator(ValueType type, Operator operator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
ValueType
getCoercedValueType()
Returns the value type this evaluator will coerce operands to, during evaluation.Interval
getInterval()
In case this is a temporal evaluator, returns the interval in which this evaluator may match the target factOperator
getOperator()
Returns the operator representation object for this evaluatorValueType
getValueType()
Returns the type of the values this evaluator operates upon.int
hashCode()
boolean
isTemporal()
Returns true if this evaluator implements a temporal evaluation, i.e., a time sensitive evaluation whose properties of matching only events within an specific time interval can be used for determining event expirations automatically.void
readExternal(ObjectInput in)
String
toString()
void
writeExternal(ObjectOutput out)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.drools.core.spi.Evaluator
evaluate, evaluate, evaluateCachedLeft, evaluateCachedRight
-
-
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
getOperator
public Operator getOperator()
Description copied from interface:Evaluator
Returns the operator representation object for this evaluator- Specified by:
getOperator
in interfaceEvaluator
- Specified by:
getOperator
in interfaceorg.kie.api.runtime.rule.Evaluator
-
getValueType
public ValueType getValueType()
Description copied from interface:Evaluator
Returns the type of the values this evaluator operates upon.- Specified by:
getValueType
in interfaceEvaluator
- Returns:
-
getCoercedValueType
public ValueType getCoercedValueType()
Description copied from interface:Evaluator
Returns the value type this evaluator will coerce operands to, during evaluation. This is useful for operators like "memberOf", that always convert to Object when evaluating, independently of the source operand value type.- Specified by:
getCoercedValueType
in interfaceEvaluator
- Returns:
-
isTemporal
public boolean isTemporal()
Description copied from interface:Evaluator
Returns true if this evaluator implements a temporal evaluation, i.e., a time sensitive evaluation whose properties of matching only events within an specific time interval can be used for determining event expirations automatically.- Specified by:
isTemporal
in interfaceEvaluator
- Specified by:
isTemporal
in interfaceorg.kie.api.runtime.rule.Evaluator
- Returns:
- true if the evaluator is a temporal evaluator.
-
getInterval
public Interval getInterval()
Description copied from interface:Evaluator
In case this is a temporal evaluator, returns the interval in which this evaluator may match the target fact- Specified by:
getInterval
in interfaceEvaluator
- Returns:
-
-