Enum CelStandardMacro

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

    public enum CelStandardMacro
    extends java.lang.Enum<CelStandardMacro>
    CelStandardMacro enum represents all of the macros defined as part of the CEL standard library.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ALL
      Boolean comprehension which asserts that a predicate holds true for all elements in the input range.
      EXISTS
      Boolean comprehension which asserts that a predicate holds true for at least one element in the input range.
      EXISTS_ONE
      Boolean comprehension which asserts that a predicate holds true for exactly one element in the input range.
      FILTER
      Comprehension which produces a list containing elements in the input range which match the filter.
      HAS
      Field presence test macro
      MAP
      Comprehension which applies a transform to each element in the input range and produces a list of equivalent size as output.
      MAP_FILTER
      Comprehension which conditionally applies a transform to elements in the list which satisfy the filter predicate.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static com.google.common.collect.ImmutableSet<CelStandardMacro> STANDARD_MACROS
      Set of all standard macros supported by the CEL spec.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CelMacro getDefinition()
      Returns the new-style CelMacro definition.
      java.lang.String getFunction()
      Returns the function name associated with the macro.
      static CelStandardMacro valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static CelStandardMacro[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ALL

        public static final CelStandardMacro ALL
        Boolean comprehension which asserts that a predicate holds true for all elements in the input range.
      • EXISTS

        public static final CelStandardMacro EXISTS
        Boolean comprehension which asserts that a predicate holds true for at least one element in the input range.
      • EXISTS_ONE

        public static final CelStandardMacro EXISTS_ONE
        Boolean comprehension which asserts that a predicate holds true for exactly one element in the input range.
      • MAP

        public static final CelStandardMacro MAP
        Comprehension which applies a transform to each element in the input range and produces a list of equivalent size as output.
      • MAP_FILTER

        public static final CelStandardMacro MAP_FILTER
        Comprehension which conditionally applies a transform to elements in the list which satisfy the filter predicate.
      • FILTER

        public static final CelStandardMacro FILTER
        Comprehension which produces a list containing elements in the input range which match the filter.
    • Field Detail

      • STANDARD_MACROS

        public static final com.google.common.collect.ImmutableSet<CelStandardMacro> STANDARD_MACROS
        Set of all standard macros supported by the CEL spec.
    • Method Detail

      • values

        public static CelStandardMacro[] 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 (CelStandardMacro c : CelStandardMacro.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CelStandardMacro 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 function name associated with the macro.
      • getDefinition

        public CelMacro getDefinition()
        Returns the new-style CelMacro definition.