Enum Class MathOperator

java.lang.Object
java.lang.Enum<MathOperator>
org.litebridge.db.spi.math.MathOperator
All Implemented Interfaces:
Serializable, Comparable<MathOperator>, Constable

public enum MathOperator extends Enum<MathOperator>
Predefined mathematical operators for use in SQL operations.
  • Enum Constant Details

    • ADD

      public static final MathOperator ADD
      Addition operator for mathematical calculations.

      The operator symbol is "+".

    • SUBTRACT

      public static final MathOperator SUBTRACT
      Subtraction operator for mathematical calculations.

      The operator symbol is "-".

    • MULTIPLY

      public static final MathOperator MULTIPLY
      Multiplication operator for mathematical calculations.

      The operator symbol is "*".

    • DIVIDE

      public static final MathOperator DIVIDE
      Division operator for mathematical calculations.

      The operator symbol is "/".

    • MOD

      public static final MathOperator MOD
      Modulo operator for mathematical calculations.

      The operator symbol is "%".

  • Method Details

    • values

      public static MathOperator[] 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 MathOperator 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
    • symbol

      public String symbol()
      Retrieves the symbol representing this operator.
      Returns:
      the operator's symbolic representation as a string.