Drools :: Core 6.1.0.Beta1

org.drools.core.base
Class BaseEvaluator

java.lang.Object
  extended by org.drools.core.base.BaseEvaluator
All Implemented Interfaces:
Externalizable, Serializable, org.kie.api.runtime.rule.Evaluator
Direct Known Subclasses:
AfterEvaluatorDefinition.AfterEvaluator, BeforeEvaluatorDefinition.BeforeEvaluator, CoincidesEvaluatorDefinition.CoincidesEvaluator, DuringEvaluatorDefinition.DuringEvaluator, FinishedByEvaluatorDefinition.FinishedByEvaluator, FinishesEvaluatorDefinition.FinishesEvaluator, IncludesEvaluatorDefinition.IncludesEvaluator, IsAEvaluatorDefinition.IsAEvaluator, MatchesEvaluatorsDefinition.StringMatchesEvaluator, MatchesEvaluatorsDefinition.StringNotMatchesEvaluator, MeetsEvaluatorDefinition.MeetsEvaluator, MetByEvaluatorDefinition.MetByEvaluator, OverlappedByEvaluatorDefinition.OverlappedByEvaluator, OverlapsEvaluatorDefinition.OverlapsEvaluator, 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
BaseEvaluator()
           
BaseEvaluator(ValueType type, Operator operator)
           
 
Method Summary
 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 fact
 Operator getOperator()
          Returns the operator representation object for this evaluator
 ValueType 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
 

Constructor Detail

BaseEvaluator

public BaseEvaluator()

BaseEvaluator

public BaseEvaluator(ValueType type,
                     Operator operator)
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

getOperator

public Operator getOperator()
Description copied from interface: Evaluator
Returns the operator representation object for this evaluator

Specified by:
getOperator in interface org.kie.api.runtime.rule.Evaluator

getValueType

public ValueType getValueType()
Description copied from interface: Evaluator
Returns the type of the values this evaluator operates upon.

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.

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 interface org.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

Returns:

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

Drools :: Core 6.1.0.Beta1

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.