org.opengts.util
Enum TriState

java.lang.Object
  extended by java.lang.Enum<TriState>
      extended by org.opengts.util.TriState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TriState>, EnumTools.IntValue

public enum TriState
extends java.lang.Enum<TriState>
implements EnumTools.IntValue

Provides various String parsing/format utilities


Enum Constant Summary
FALSE
           
TRUE
           
UNKNOWN
           
 
Method Summary
 int getIntValue()
          Returns the integer value of this instance
 boolean isDefault()
          Returns true if this is the default value (UNKNOWN) or this TriState
 boolean isFalse()
          Returns true if the value is "False"
 boolean isTrue()
          Returns true if the value is "True"
 boolean isUnknown()
          Returns true if the value is "Unknown"
 java.lang.String toString()
          Returns the String representation of this instance
static TriState valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TriState[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

UNKNOWN

public static final TriState UNKNOWN

FALSE

public static final TriState FALSE

TRUE

public static final TriState TRUE
Method Detail

values

public static TriState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TriState c : TriState.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TriState valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getIntValue

public int getIntValue()
Returns the integer value of this instance

Specified by:
getIntValue in interface EnumTools.IntValue
Returns:
The integer value of this instance

toString

public java.lang.String toString()
Returns the String representation of this instance

Overrides:
toString in class java.lang.Enum<TriState>
Returns:
The String representation of this instance

isDefault

public boolean isDefault()
Returns true if this is the default value (UNKNOWN) or this TriState

Returns:
True if this is the default value (UNKNOWN) or this TriState

isUnknown

public boolean isUnknown()
Returns true if the value is "Unknown"

Returns:
True if the value is "Unknown"

isTrue

public boolean isTrue()
Returns true if the value is "True"

Returns:
True if the value is "True"

isFalse

public boolean isFalse()
Returns true if the value is "False"

Returns:
True if the value is "False"