Package org.miaixz.bus.core.lang.range
Enum Class BoundType
- All Implemented Interfaces:
Serializable,Comparable<BoundType>,Constable
边界类型枚举
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription表示一个左闭区间,等同于{x | x >= a}表示一个右闭区间,等同于{x | x <= a}表示一个左开区间,等同于{x | x > a}表示一个右开区间,等同于{x | x < a} -
Method Summary
Modifier and TypeMethodDescriptionintgetCode()获取code获取运算符获取符号booleanisClose()是闭区间booleanisDislocated(BoundType boundType) 该边界类型是否与当前边界错位,即一个的左边界,一个是右边界boolean是下界booleanisOpen()是开区间boolean是上界negate()对边界类型取反static BoundTypeReturns the enum constant of this class with the specified name.static BoundType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLOSE_LOWER_BOUND
表示一个左闭区间,等同于{x | x >= a} -
OPEN_LOWER_BOUND
表示一个左开区间,等同于{x | x > a} -
OPEN_UPPER_BOUND
表示一个右开区间,等同于{x | x < a} -
CLOSE_UPPER_BOUND
表示一个右闭区间,等同于{x | x <= a}
-
-
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
-
getSymbol
获取符号- Returns:
- 符号
-
getCode
public int getCode()获取code- Returns:
- code
-
getOperator
获取运算符- Returns:
- 运算符
-
isDislocated
该边界类型是否与当前边界错位,即一个的左边界,一个是右边界- Parameters:
boundType- 另一边界类型- Returns:
- 是否
-
isLowerBound
public boolean isLowerBound()是下界- Returns:
- 是否
-
isUpperBound
public boolean isUpperBound()是上界- Returns:
- 是否
-
isClose
public boolean isClose()是闭区间- Returns:
- 是否
-
isOpen
public boolean isOpen()是开区间- Returns:
- 是否
-
negate
对边界类型取反- Returns:
- 取反后的边界类型
-