Class 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
    • Constructor Detail

      • Operator

        public Operator()
    • 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 operator
        isNegated - 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 operator
        isNegated - 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:
        readExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • writeExternal

        public void writeExternal​(java.io.ObjectOutput out)
                           throws java.io.IOException
        Specified by:
        writeExternal in interface java.io.Externalizable
        Throws:
        java.io.IOException
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getOperatorString

        public java.lang.String getOperatorString()
        Specified by:
        getOperatorString in interface org.kie.api.runtime.rule.Operator
      • isNegated

        public boolean isNegated()
        Specified by:
        isNegated in interface org.kie.api.runtime.rule.Operator
      • hashCode

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

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