站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

BaseEvaluator - JBoss RULES 3.0.6 API 英文版文档


org.drools.base
Class BaseEvaluator

java.lang.Object
  extended by org.drools.base.BaseEvaluator
All Implemented Interfaces:
java.io.Serializable, Evaluator

public abstract class BaseEvaluator
extends java.lang.Object
implements Evaluator

BaseEvaluator is an Object Comparator that is operator aware

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.drools.spi.Evaluator
ARRAY_TYPE, BOOLEAN_TYPE, BYTE_TYPE, CHAR_TYPE, CONTAINS, DATE_TYPE, DOUBLE_TYPE, EQUAL, EXCLUDES, FLOAT_TYPE, GREATER, GREATER_OR_EQUAL, INTEGER_TYPE, LESS, LESS_OR_EQUAL, LONG_TYPE, MATCHES, NOT_EQUAL, NULL_TYPE, OBJECT_TYPE, SHORT_TYPE, STRING_TYPE
 
Constructor Summary
BaseEvaluator(int type, int operator)
           
 
Method Summary
 boolean equals(java.lang.Object other)
           
abstract  boolean evaluate(java.lang.Object object1, java.lang.Object object2)
          This method will apply the evaluator on the objects.
 int getOperator()
           
 int getType()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseEvaluator

public BaseEvaluator(int type,
                     int operator)
Method Detail

getOperator

public int getOperator()
Specified by:
getOperator in interface Evaluator

getType

public int getType()
Specified by:
getType in interface Evaluator

evaluate

public abstract boolean evaluate(java.lang.Object object1,
                                 java.lang.Object object2)
Description copied from interface: Evaluator
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.

Specified by:
evaluate in interface Evaluator

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object