Package dev.cel.parser
Enum CelStandardMacro
- java.lang.Object
-
- java.lang.Enum<CelStandardMacro>
-
- dev.cel.parser.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 ALLBoolean comprehension which asserts that a predicate holds true for all elements in the input range.EXISTSBoolean comprehension which asserts that a predicate holds true for at least one element in the input range.EXISTS_ONEBoolean comprehension which asserts that a predicate holds true for exactly one element in the input range.FILTERComprehension which produces a list containing elements in the input range which match the filter.HASField presence test macroMAPComprehension which applies a transform to each element in the input range and produces a list of equivalent size as output.MAP_FILTERComprehension 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_MACROSSet of all standard macros supported by the CEL spec.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CelMacrogetDefinition()Returns the new-styleCelMacrodefinition.java.lang.StringgetFunction()Returns the function name associated with the macro.static CelStandardMacrovalueOf(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.
-
-
-
Enum Constant Detail
-
HAS
public static final CelStandardMacro HAS
Field presence test macro
-
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 namejava.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-styleCelMacrodefinition.
-
-