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 booleanequals(Object object)ValueTypegetCoercedValueType()Returns the value type this evaluator will coerce operands to, during evaluation.IntervalgetInterval()In case this is a temporal evaluator, returns the interval in which this evaluator may match the target factOperatorgetOperator()Returns the operator representation object for this evaluatorValueTypegetValueType()Returns the type of the values this evaluator operates upon.inthashCode()booleanisTemporal()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.voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(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:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
getOperator
public Operator getOperator()
Description copied from interface:EvaluatorReturns the operator representation object for this evaluator- Specified by:
getOperatorin interfaceEvaluator- Specified by:
getOperatorin interfaceorg.kie.api.runtime.rule.Evaluator
-
getValueType
public ValueType getValueType()
Description copied from interface:EvaluatorReturns the type of the values this evaluator operates upon.- Specified by:
getValueTypein interfaceEvaluator- Returns:
-
getCoercedValueType
public ValueType getCoercedValueType()
Description copied from interface:EvaluatorReturns 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:
getCoercedValueTypein interfaceEvaluator- Returns:
-
isTemporal
public boolean isTemporal()
Description copied from interface:EvaluatorReturns 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:
isTemporalin interfaceEvaluator- Specified by:
isTemporalin interfaceorg.kie.api.runtime.rule.Evaluator- Returns:
- true if the evaluator is a temporal evaluator.
-
getInterval
public Interval getInterval()
Description copied from interface:EvaluatorIn case this is a temporal evaluator, returns the interval in which this evaluator may match the target fact- Specified by:
getIntervalin interfaceEvaluator- Returns:
-
-