Enum Class BoundType

java.lang.Object
java.lang.Enum<BoundType>
org.miaixz.bus.core.lang.range.BoundType
All Implemented Interfaces:
Serializable, Comparable<BoundType>, Constable

public enum BoundType extends Enum<BoundType>
边界类型枚举
Since:
Java 17+
Author:
Kimi Liu
  • Enum Constant Details

    • CLOSE_LOWER_BOUND

      public static final BoundType CLOSE_LOWER_BOUND
      表示一个左闭区间,等同于{x | x >= a}
    • OPEN_LOWER_BOUND

      public static final BoundType OPEN_LOWER_BOUND
      表示一个左开区间,等同于{x | x > a}
    • OPEN_UPPER_BOUND

      public static final BoundType OPEN_UPPER_BOUND
      表示一个右开区间,等同于{x | x < a}
    • CLOSE_UPPER_BOUND

      public static final BoundType CLOSE_UPPER_BOUND
      表示一个右闭区间,等同于{x | x <= a}
  • Method Details

    • values

      public static BoundType[] 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 BoundType 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
    • getSymbol

      public String getSymbol()
      获取符号
      Returns:
      符号
    • getCode

      public int getCode()
      获取code
      Returns:
      code
    • getOperator

      public String getOperator()
      获取运算符
      Returns:
      运算符
    • isDislocated

      public boolean isDislocated(BoundType boundType)
      该边界类型是否与当前边界错位,即一个的左边界,一个是右边界
      Parameters:
      boundType - 另一边界类型
      Returns:
      是否
    • isLowerBound

      public boolean isLowerBound()
      是下界
      Returns:
      是否
    • isUpperBound

      public boolean isUpperBound()
      是上界
      Returns:
      是否
    • isClose

      public boolean isClose()
      是闭区间
      Returns:
      是否
    • isOpen

      public boolean isOpen()
      是开区间
      Returns:
      是否
    • negate

      public BoundType negate()
      对边界类型取反
      Returns:
      取反后的边界类型