Package org.drools.core.base.evaluators
Class Operator
- java.lang.Object
-
- org.drools.core.base.evaluators.Operator
-
- All Implemented Interfaces:
Externalizable,Serializable,org.kie.api.runtime.rule.Operator
public class Operator extends Object implements Externalizable, org.kie.api.runtime.rule.Operator
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static OperatorCONTAINSstatic OperatorEQUALstatic OperatorEXCLUDESstatic OperatorGREATERstatic OperatorGREATER_OR_EQUALstatic OperatorLESSstatic OperatorLESS_OR_EQUALstatic OperatorMATCHESstatic OperatorMEMBEROFstatic OperatorNOT_CONTAINSstatic OperatorNOT_EQUALstatic OperatorNOT_EXCLUDESstatic OperatorNOT_MATCHESstatic OperatorNOT_MEMBEROFstatic OperatorNOT_SOUNDSLIKEstatic OperatorSOUNDSLIKE
-
Constructor Summary
Constructors Constructor Description Operator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperatoraddOperatorToRegistry(String operatorId, boolean isNegated)Creates a new Operator instance for the given parameters, adds it to the registry and return itstatic OperatordetermineOperator(String operatorId, boolean isNegated)Returns the operator instance for the given parametersbooleanequals(Object obj)static Collection<Operator>getAllOperators()StringgetOperatorString()inthashCode()booleanisNegated()voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Field Detail
-
EQUAL
public static final Operator EQUAL
-
NOT_EQUAL
public static final Operator NOT_EQUAL
-
LESS
public static final Operator LESS
-
LESS_OR_EQUAL
public static final Operator LESS_OR_EQUAL
-
GREATER
public static final Operator GREATER
-
GREATER_OR_EQUAL
public static final Operator GREATER_OR_EQUAL
-
CONTAINS
public static final Operator CONTAINS
-
NOT_CONTAINS
public static final Operator NOT_CONTAINS
-
EXCLUDES
public static final Operator EXCLUDES
-
NOT_EXCLUDES
public static final Operator NOT_EXCLUDES
-
MEMBEROF
public static final Operator MEMBEROF
-
NOT_MEMBEROF
public static final Operator NOT_MEMBEROF
-
MATCHES
public static final Operator MATCHES
-
NOT_MATCHES
public static final Operator NOT_MATCHES
-
SOUNDSLIKE
public static final Operator SOUNDSLIKE
-
NOT_SOUNDSLIKE
public static final Operator NOT_SOUNDSLIKE
-
-
Method Detail
-
addOperatorToRegistry
public static Operator addOperatorToRegistry(String operatorId, boolean isNegated)
Creates a new Operator instance for the given parameters, adds it to the registry and return it- Parameters:
operatorId- the identification symbol of the operatorisNegated- true if it is negated- Returns:
- the newly created operator
-
getAllOperators
public static Collection<Operator> getAllOperators()
-
determineOperator
public static Operator determineOperator(String operatorId, boolean isNegated)
Returns the operator instance for the given parameters- Parameters:
operatorId- the identification symbol of the operatorisNegated- true if it is negated- Returns:
- the operator in case it exists
-
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
-
getOperatorString
public String getOperatorString()
- Specified by:
getOperatorStringin interfaceorg.kie.api.runtime.rule.Operator
-
isNegated
public boolean isNegated()
- Specified by:
isNegatedin interfaceorg.kie.api.runtime.rule.Operator
-
-