public enum BoundType extends Enum<BoundType>
| 枚举常量和说明 |
|---|
CLOSE_LOWER_BOUND
表示一个左闭区间,等同于
{x | x >= a} |
CLOSE_UPPER_BOUND
表示一个右闭区间,等同于
{x | x <= a} |
OPEN_LOWER_BOUND
表示一个左开区间,等同于
{x | x > a} |
OPEN_UPPER_BOUND
表示一个右开区间,等同于
{x | x < a} |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getCode()
获取code
|
String |
getOperator()
获取运算符
|
String |
getSymbol()
获取符号
|
boolean |
isClose()
是闭区间
|
boolean |
isDislocated(BoundType boundType)
该边界类型是否与当前边界错位,即一个的左边界,一个是右边界
|
boolean |
isLowerBound()
是下界
|
boolean |
isOpen()
是开区间
|
boolean |
isUpperBound()
是上界
|
BoundType |
negate()
对边界类型取反
|
static BoundType |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static BoundType[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final BoundType CLOSE_LOWER_BOUND
{x | x >= a}public static final BoundType OPEN_LOWER_BOUND
{x | x > a}public static final BoundType OPEN_UPPER_BOUND
{x | x < a}public static final BoundType CLOSE_UPPER_BOUND
{x | x <= a}public static BoundType[] values()
for (BoundType c : BoundType.values()) System.out.println(c);
public static BoundType valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String getSymbol()
public int getCode()
public String getOperator()
public boolean isDislocated(BoundType boundType)
boundType - 另一边界类型public boolean isLowerBound()
public boolean isUpperBound()
public boolean isClose()
public boolean isOpen()
public BoundType negate()
Copyright © 2024. All rights reserved.