Package org.drools.drl.parser.impl
Class Operator
- java.lang.Object
-
- org.drools.drl.parser.impl.Operator
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,org.kie.api.runtime.rule.Operator
public class Operator extends java.lang.Object implements java.io.Externalizable, org.kie.api.runtime.rule.Operator- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOperator.BuiltInOperator
-
Constructor Summary
Constructors Constructor Description Operator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperatoraddOperatorToRegistry(java.lang.String operatorId, boolean isNegated)Creates a new Operator instance for the given parameters, adds it to the registry and return itstatic OperatordetermineOperator(java.lang.String operatorId, boolean isNegated)Returns the operator instance for the given parametersbooleanequals(java.lang.Object obj)static java.util.Collection<Operator>getAllOperators()java.lang.StringgetOperatorString()inthashCode()booleanisNegated()voidreadExternal(java.io.ObjectInput in)java.lang.StringtoString()voidwriteExternal(java.io.ObjectOutput out)
-
-
-
Method Detail
-
addOperatorToRegistry
public static Operator addOperatorToRegistry(java.lang.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 java.util.Collection<Operator> getAllOperators()
-
determineOperator
public static Operator determineOperator(java.lang.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(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getOperatorString
public java.lang.String getOperatorString()
- Specified by:
getOperatorStringin interfaceorg.kie.api.runtime.rule.Operator
-
isNegated
public boolean isNegated()
- Specified by:
isNegatedin interfaceorg.kie.api.runtime.rule.Operator
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-