Class ModExpressionStateObject

  • All Implemented Interfaces:
    StateObject

    public class ModExpressionStateObject
    extends AbstractDoubleEncapsulatedExpressionStateObject
    The modulo operation finds the remainder of division of one number by another.

    It takes two integer arguments and returns an integer.

    BNF: expression ::= MOD(simple_arithmetic_expression, simple_arithmetic_expression)

    Version:
    2.4
    See Also:
    ModExpression
    Author:
    Pascal Filion
    Since:
    2.4
    • Constructor Detail

      • ModExpressionStateObject

        public ModExpressionStateObject​(StateObject parent)
        Creates a new ModExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • ModExpressionStateObject

        public ModExpressionStateObject​(StateObject parent,
                                        StateObject firstStateObject,
                                        StateObject secondStateObject)
        Creates a new ModExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        firstStateObject - The StateObject representing the first expression
        secondStateObject - The StateObject representing the second expression
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
      • ModExpressionStateObject

        public ModExpressionStateObject​(StateObject parent,
                                        java.lang.String firstJpqlFragment,
                                        java.lang.String secondJpqlFragment)
        Creates a new ModExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        firstJpqlFragment - The string representation of the first encapsulated expression to parse and to convert into a StateObject representation
        secondJpqlFragment - The string representation of the second encapsulated expression to parse and to convert into a StateObject representation
        Throws:
        java.lang.NullPointerException - The given parent cannot be null