public enum ETriState extends Enum<ETriState> implements IHasID<String>, ITriState
| Modifier and Type | Method and Description |
|---|---|
Boolean |
getAsBooleanObj(boolean aUndefinedValue) |
Boolean |
getAsBooleanObj(Boolean aUndefinedValue)
Convert the tri state value into a
Boolean value, depending on what
"undefined" means. |
boolean |
getAsBooleanValue(boolean bUndefinedValue)
Convert the tri state value into a boolean value, depending on what
"undefined" means.
|
static ETriState |
getFromIDOrDefault(String sID,
ETriState eDefault) |
static ETriState |
getFromIDOrNull(String sID) |
static ETriState |
getFromIDOrUndefined(String sID) |
String |
getID()
Get the unique ID of this object.
|
boolean |
isDefined() |
boolean |
isFalse() |
boolean |
isTrue() |
boolean |
isUndefined() |
static ETriState |
valueOf(boolean bValue) |
static ETriState |
valueOf(Boolean aValue) |
static ETriState |
valueOf(ITriState aTriState) |
static ETriState |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ETriState[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ETriState TRUE
public static final ETriState FALSE
public static final ETriState UNDEFINED
public static ETriState[] values()
for (ETriState c : ETriState.values()) System.out.println(c);
public static ETriState 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 null@Nonnull @Nonempty public String getID()
IHasIDString than the
returned value must match an XML NMToken expression (so e.g. no ':' in the
ID)!public boolean isTrue()
public boolean isFalse()
public boolean isDefined()
public boolean isUndefined()
isUndefined in interface ITriStatetrue if the value is undefined (if it is neither
true nor false)public boolean getAsBooleanValue(boolean bUndefinedValue)
ITriStategetAsBooleanValue in interface ITriStatebUndefinedValue - The boolean representation of undefined.true if ITriState.isTrue() is true, false
if ITriState.isFalse() is true, or otherwise the passed parameter!@Nullable public Boolean getAsBooleanObj(@Nullable Boolean aUndefinedValue)
ITriStateBoolean value, depending on what
"undefined" means.getAsBooleanObj in interface ITriStateaUndefinedValue - The Boolean representation of undefined.Boolean.TRUE if ITriState.isTrue() is true,
Boolean.FALSE if ITriState.isFalse() is true, or otherwise
the passed parameter!Copyright © 2006–2015 phloc systems. All rights reserved.