Enum Class LiteralType

java.lang.Object
java.lang.Enum<LiteralType>
com.libdbm.cel.ast.LiteralType
All Implemented Interfaces:
Serializable, Comparable<LiteralType>, Constable

public enum LiteralType extends Enum<LiteralType>
Enumeration representing the type of literal values in CEL expressions.

This enum defines the various literal types that can appear in CEL expressions, including null values, boolean, integer, unsigned integer, double, string, and bytes literals.

  • Enum Constant Details

    • NULL_VALUE

      public static final LiteralType NULL_VALUE
      Represents a null literal value in CEL expressions.

      This constant indicates that a literal expression represents a null value in the CEL language. It is used in conjunction with the LiteralType enum to distinguish between different types of literal values in expressions.

    • BOOL

      public static final LiteralType BOOL
      Represents a boolean literal value in CEL expressions.

      This enum constant indicates that a literal value is of boolean type, containing either true or false.

    • INT

      public static final LiteralType INT
      Integer literal type constant.

      Represents integer values in CEL expressions, including both signed and unsigned integer literals. This type is used to distinguish integer values from other numeric types such as doubles or unsigned integers.

    • UINT

      public static final LiteralType UINT
      Represents an unsigned integer literal type in CEL expressions.

      This enumeration value indicates that a literal expression represents an unsigned integer value, which can be used in arithmetic operations and comparisons within CEL expressions.

    • DOUBLE

      public static final LiteralType DOUBLE
      Represents a double precision floating-point literal value in CEL expressions.

      This enumeration constant is used to identify double literal types within the LiteralType enum, distinguishing them from other literal value types such as integers, booleans, strings, and bytes.

    • STRING

      public static final LiteralType STRING
      Represents a string literal value in CEL expressions.

      This enum constant indicates that a literal value is a string type, containing character sequences enclosed in double quotes.

    • BYTES

      public static final LiteralType BYTES
      Represents a bytes literal type in CEL expressions.

      This enum constant indicates that a literal value represents a bytes type, which is a sequence of bytes typically used for binary data in expressions.

  • Method Details

    • values

      public static LiteralType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static LiteralType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null