Enum Class CompareUtil.Operator

java.lang.Object
java.lang.Enum<CompareUtil.Operator>
cloud.opencode.base.core.compare.CompareUtil.Operator
All Implemented Interfaces:
Serializable, Comparable<CompareUtil.Operator>, Constable
Enclosing class:
CompareUtil

public static enum CompareUtil.Operator extends Enum<CompareUtil.Operator>
Comparison operators. 比较运算符。
Since:
JDK 25, opencode-base-core V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

  • Method Details

    • values

      public static CompareUtil.Operator[] 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 CompareUtil.Operator 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()
      Get the symbol representation. 获取符号表示。
      Returns:
      the symbol
    • evaluate

      public abstract boolean evaluate(int comparison)
      Evaluate the comparison result against this operator. 根据此运算符评估比较结果。
      Parameters:
      comparison - the result of compareTo (negative, 0, or positive)
      Returns:
      true if the comparison satisfies this operator