Class OperationExpression


  • public class OperationExpression
    extends Expression
    An operation composes two values.
    • Field Detail

      • OPERATOR_OR

        public static final IOperator OPERATOR_OR
        The OR operator (||).
      • OPERATOR_AND

        public static final IOperator OPERATOR_AND
        The AND operator (&&).
      • left

        protected Expression left
        The left value expression.
      • right

        protected Expression right
        The right value expression.
      • operator

        protected java.lang.Object operator
        The operator.
    • Method Detail

      • containsVariable

        public boolean containsVariable​(Variable var)
        Test if a variable is contained in the expression.
        Specified by:
        containsVariable in class Expression
        Parameters:
        var - The variable.
        Returns:
        True, when the variable is contained.
      • getLeftValue

        public Expression getLeftValue()
        Get the left value.
      • getRightValue

        public Expression getRightValue()
        Get the right value.
      • getOperator

        public java.lang.Object getOperator()
        Get the operator.
      • toString

        public java.lang.String toString()
        Get a string representation of this operation.
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Test if this operation is equal to some object.
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Get the hash code of this operation.
        Overrides:
        hashCode in class java.lang.Object
      • getInverseOperator0

        public static IOperator getInverseOperator0​(IOperator operator)
        Get the inverse operator.
        Parameters:
        operator - The operator
        Returns:
        The inverse operator or null if none exists.