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 https://pkg.go.dev/github.com/google/cel-go/common/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

        public static final Operator EXISTS_ONE
      • 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.
      • 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.