Enum Class BinaryOp

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

public enum BinaryOp extends Enum<BinaryOp>
Binary operators supported in CEL expressions.

Represents the various operators that can be applied to two operands in binary operations. Includes arithmetic operators, comparison operators, logical operators, modulo operation, and membership testing.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Binary addition operator.
    Represents the division operation in binary expressions.
    Represents the equality comparison operator in binary operations.
    Binary operator representing the greater than comparison.
    Binary operator representing the greater than or equal comparison.
    Represents the membership testing operator 'in' in binary operations.
    Represents the less-than comparison operator in binary operations.
    Binary comparison operator representing "less than or equal to".
    Represents the logical AND operation in binary expressions.
    Represents the logical OR operator in binary operations.
    Represents the modulo operation in binary expressions.
    Binary multiplication operator.
    Represents the not equal comparison operator in binary operations.
    Binary subtraction operator.
  • Method Summary

    Modifier and Type
    Method
    Description
    static BinaryOp
    Returns the enum constant of this class with the specified name.
    static BinaryOp[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

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

    • ADD

      public static final BinaryOp ADD
      Binary addition operator.

      Represents the addition operation between two operands in binary expressions. Supports numeric addition and string concatenation.

    • SUBTRACT

      public static final BinaryOp SUBTRACT
      Binary subtraction operator.

      Represents the subtraction operation between two numeric operands in a binary expression. The result is the difference obtained by subtracting the right operand from the left operand.

    • MULTIPLY

      public static final BinaryOp MULTIPLY
      Binary multiplication operator.

      Represents the multiplication operation between two numeric operands in CEL expressions. The result is the product of the left and right operands.

    • DIVIDE

      public static final BinaryOp DIVIDE
      Represents the division operation in binary expressions.

      Used to indicate that a division operation should be performed between two operands.

    • MODULO

      public static final BinaryOp MODULO
      Represents the modulo operation in binary expressions.

      When applied to two numeric operands, this operator returns the remainder of the division of the left operand by the right operand.

    • EQUAL

      public static final BinaryOp EQUAL
      Represents the equality comparison operator in binary operations.

      This enum constant corresponds to the '==' operator used to test whether two operands are equal. It is one of the binary operators defined in the BinaryOp enumeration.

    • NOT_EQUAL

      public static final BinaryOp NOT_EQUAL
      Represents the not equal comparison operator in binary operations.

      This operator evaluates to true if the two operands are not equal in value.

    • LESS

      public static final BinaryOp LESS
      Represents the less-than comparison operator in binary operations.

      Used to compare two operands and determine if the left operand is less than the right operand. The result is a boolean value indicating the outcome of the comparison.

    • LESS_EQUAL

      public static final BinaryOp LESS_EQUAL
      Binary comparison operator representing "less than or equal to".

      Used to compare two operands where the left-hand operand is evaluated to be less than or equal to the right-hand operand. Returns a boolean value indicating the result of the comparison.

    • GREATER

      public static final BinaryOp GREATER
      Binary operator representing the greater than comparison.

      Used in binary operations to test if the left operand is greater than the right operand. Returns true if the left operand is greater than the right operand, false otherwise.

    • GREATER_EQUAL

      public static final BinaryOp GREATER_EQUAL
      Binary operator representing the greater than or equal comparison.

      Used to compare two operands where the left-hand operand is greater than or equal to the right-hand operand. Returns true if the condition holds, false otherwise.

    • LOGICAL_AND

      public static final BinaryOp LOGICAL_AND
      Represents the logical AND operation in binary expressions.

      Used to combine two boolean expressions, returning true only if both operands evaluate to true.

    • LOGICAL_OR

      public static final BinaryOp LOGICAL_OR
      Represents the logical OR operator in binary operations.

      Used to combine two boolean expressions, returning true if at least one of the operands is true.

    • IN

      public static final BinaryOp IN
      Represents the membership testing operator 'in' in binary operations.

      Used to test whether a value exists within a collection or map, returning true if the value is found and false otherwise.

  • Method Details

    • values

      public static BinaryOp[] 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 BinaryOp 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