Enum Operator

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Operator>

    public enum Operator
    extends java.lang.Enum<Operator>
    Package-private enumeration of Common Expression Language operators.

    Equivalent to operators.

    • Enum Constant Detail

      • CONDITIONAL

        public static final Operator CONDITIONAL
      • LOGICAL_AND

        public static final Operator LOGICAL_AND
      • LOGICAL_OR

        public static final Operator LOGICAL_OR
      • LOGICAL_NOT

        public static final Operator LOGICAL_NOT
      • EQUALS

        public static final Operator EQUALS
      • NOT_EQUALS

        public static final Operator NOT_EQUALS
      • LESS

        public static final Operator LESS
      • LESS_EQUALS

        public static final Operator LESS_EQUALS
      • GREATER

        public static final Operator GREATER
      • GREATER_EQUALS

        public static final Operator GREATER_EQUALS
      • SUBTRACT

        public static final Operator SUBTRACT
      • MULTIPLY

        public static final Operator MULTIPLY
      • DIVIDE

        public static final Operator DIVIDE
      • MODULO

        public static final Operator MODULO
      • NEGATE

        public static final Operator NEGATE
      • INDEX

        public static final Operator INDEX
      • EXISTS

        public static final Operator EXISTS
      • EXISTS_ONE

        @Deprecated
        public static final Operator EXISTS_ONE
        Deprecated.
      • EXISTS_ONE_NEW

        public static final Operator EXISTS_ONE_NEW
      • FILTER

        public static final Operator FILTER
      • NOT_STRICTLY_FALSE

        public static final Operator NOT_STRICTLY_FALSE
      • OPTIONAL_INDEX

        public static final Operator OPTIONAL_INDEX
      • OPTIONAL_SELECT

        public static final Operator OPTIONAL_SELECT
      • OLD_NOT_STRICTLY_FALSE

        @Deprecated
        public static final Operator OLD_NOT_STRICTLY_FALSE
        Deprecated.
      • OLD_IN

        @Deprecated
        public static final Operator OLD_IN
        Deprecated.
    • Method Detail

      • values

        public static Operator[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Operator c : Operator.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Operator valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getFunction

        public java.lang.String getFunction()
        Returns the mangled operator name, as used within the AST.
      • find

        public static java.util.Optional<Operator> find​(java.lang.String text)
        Lookup an operator by its unmangled name, as used with the source text of an expression.
      • findReverse

        public static java.util.Optional<Operator> findReverse​(java.lang.String op)
        Lookup an operator by its mangled name (ex: _&&_), as used within the AST.
      • lookupPrecedence

        public static int lookupPrecedence​(java.lang.String op)
        Returns the precedence of the operator.
        Returns:
        Integer value describing precedence. Higher value means higher precedence. Returns 0 if the operator is not found.
      • lookupUnaryOperator

        public static java.util.Optional<java.lang.String> lookupUnaryOperator​(java.lang.String op)
        Looks up the associated unary operator based on its function name (Ex: !_ -> !)
      • lookupBinaryOperator

        public static java.util.Optional<java.lang.String> lookupBinaryOperator​(java.lang.String op)
        Looks up the associated binary operator based on its function name (Ex: _||_ -> ||)