Class ConditionalExpression


  • public class ConditionalExpression
    extends Expression
    A conditional operation uses a condition to choose from two values: condition ? first_value : second_value
    • Field Detail

      • FUNCTION_CONDITIONAL

        public static final IFunction FUNCTION_CONDITIONAL
        A function to evaluate conditionals.
      • condition

        protected Expression condition
        The condition.
      • first

        protected Expression first
        The first value expression.
      • second

        protected Expression second
        The second value expression.
    • Constructor Detail

    • 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.
      • getCondition

        public Expression getCondition()
        Get the condition.
      • getFirstValue

        public Expression getFirstValue()
        Get the first value.
      • getSecondValue

        public Expression getSecondValue()
        Get the second value.
      • toString

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

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

        public int hashCode()
        Get the hash code of this field access.
        Overrides:
        hashCode in class java.lang.Object