public enum YesNoEnum extends Enum<YesNoEnum>
| 限定符和类型 | 方法和说明 |
|---|---|
static YesNoEnum |
getByBool(boolean value)
根据Bool值确定, true-YES/false-NO
|
static YesNoEnum |
getByCode(String code)
根据编码转枚举项
|
Byte |
getByteCode() |
Integer |
getIntCode() |
static String |
getNameByCode(String code)
根据编码获取名称
|
static boolean |
isAny(Byte code) |
static boolean |
isAny(Integer code) |
static boolean |
isAny(String code)
给定的编码是否在枚举中定义
|
boolean |
isMatch(Byte code) |
boolean |
isMatch(Integer code) |
boolean |
isMatch(String code)
给定编码,是否等于此枚举项
|
static YesNoEnum |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static YesNoEnum[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static YesNoEnum[] values()
for (YesNoEnum c : YesNoEnum.values()) System.out.println(c);
public static YesNoEnum valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public Integer getIntCode()
public Byte getByteCode()
public boolean isMatch(String code)
code - 编码值public boolean isMatch(Integer code)
public boolean isMatch(Byte code)
public static boolean isAny(String code)
code - 编码public static boolean isAny(Integer code)
public static boolean isAny(Byte code)
public static YesNoEnum getByBool(boolean value)
value - boolean值Copyright © 2024. All rights reserved.