Package com.libdbm.cel.ast
Enum Class UnaryOp
- All Implemented Interfaces:
Serializable,Comparable<UnaryOp>,Constable
Enumeration representing unary operators supported in CEL expressions.
Unary operators are operations that take a single operand and produce a result. The supported operations include logical negation (NOT) and numeric negation (NEGATE).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
-
Enum Constant Details
-
NOT
Logical negation operator for boolean expressions.Represents the NOT unary operator that inverts the boolean value of its operand. When applied to a boolean expression, it returns true if the operand is false, and false if the operand is true.
-
NEGATE
Represents the numeric negation unary operator in CEL expressions.This operator negates the numeric value of its operand, effectively changing its sign. For example, if the operand is 5, the result will be -5. If the operand is -3, the result will be 3.
When used in an expression tree, this operator is represented by the NEGATE enum constant within the UnaryOp enumeration, which is part of the Unary record that encapsulates unary operations.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-