Class WhenStatement

    • Constructor Detail

      • WhenStatement

        public WhenStatement​(Restriction condition,
                             Expression value)
        Create a new WhenStatement
        Parameters:
        condition - The condition that is controlling if this value is returned or not, null is not allowed
        value - The value to return if the condition is TRUE, null is allowed
    • Method Detail

      • getCondition

        public Restriction getCondition()
        Get the condition of this statement.
        Returns:
        A Restriction object
      • getValue

        public Expression getValue()
        Get the value returned by this statement
        Returns:
        An Expression object
      • equals

        public boolean equals​(Object other)
        This statement is equal to another WhenStatement if both have equal conditions and values.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object