Package com.power4j.fist.data.constant
Enum Class YesNo
- All Implemented Interfaces:
Serializable,Comparable<YesNo>,Constable
- Since:
- 1.0
- Author:
- CJ (power4j@outlook.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptiongetValue()static booleanstatic Enabled解析static EnabledparseOrDefault(String value, Enabled defValue) 解析static EnabledparseOrNull(String value) 解析static EnabledparseOrThrow(String value, Function<String, RuntimeException> thrower) 解析static YesNoReturns the enum constant of this class with the specified name.static YesNo[]values()Returns an array containing the constants of this enum class, in the order they are declared.static boolean
-
Enum Constant Details
-
Y
Yes -
N
No
-
-
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
-
getValue
-
yes
-
not
-
parseOrDefault
解析- Parameters:
value- 被解析的数据,可以是nulldefValue- 默认值- Returns:
- 如果解析失败返回默认值
-
parseOrNull
解析- Parameters:
value- 被解析的数据- Returns:
- 如果解析失败返回 null
-
parseOrThrow
解析- Parameters:
value- 被解析的数据thrower- 异常抛出器- Returns:
- 如果解析失败抛出异常
-
parse
解析- Parameters:
value- 被解析的数据- Returns:
- 如果解析失败抛出 IllegalArgumentException
- Throws:
IllegalArgumentException
-