public enum OptBoolean extends Enum<OptBoolean>
Boolean
not allowed as solution).
Note: although use of `true` and `false` would be more convenient, they can not be chosen since they are Java keyword and compiler won't allow the choice. And since enum naming convention suggests all-upper-case, that is what is done here.
Enum Constant and Description |
---|
DEFAULT
Value that indicates that the annotation property does NOT have an explicit
definition of enabled/disabled (or true/false); instead, a higher-level
configuration value is used; or lacking higher-level global setting,
default.
|
FALSE
Value that indicates that the annotation property is explicitly defined to
be disabled, or false.
|
TRUE
Value that indicates that the annotation property is explicitly defined to
be enabled, or true.
|
Modifier and Type | Method and Description |
---|---|
Boolean |
asBoolean() |
boolean |
asPrimitive() |
static OptBoolean |
fromBoolean(Boolean b) |
static OptBoolean |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OptBoolean[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final OptBoolean TRUE
public static final OptBoolean FALSE
public static final OptBoolean DEFAULT
public static OptBoolean[] values()
for (OptBoolean c : OptBoolean.values()) System.out.println(c);
public static OptBoolean valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic Boolean asBoolean()
public boolean asPrimitive()
public static OptBoolean fromBoolean(Boolean b)
Copyright © 2014-2015 FasterXML. All Rights Reserved.