org.entityfs.support.lang
Enum TriState

java.lang.Object
  extended by java.lang.Enum<TriState>
      extended by org.entityfs.support.lang.TriState
All Implemented Interfaces:
Serializable, Comparable<TriState>

public enum TriState
extends Enum<TriState>

The TriState is an enumeration with three states: NO, YES and DONT_CARE.

Since:
1.0
Author:
Karl Gustafsson
In_jar:
entityfs-core

Enum Constant Summary
DONT_CARE
           
NO
           
YES
           
 
Method Summary
 String toString()
           
static TriState valueOf(boolean b)
          Return the tristate value for the boolean (YES or NO).
static TriState valueOf(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

NO

public static final TriState NO

YES

public static final TriState YES

DONT_CARE

public static final TriState DONT_CARE
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(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

valueOf

public static TriState valueOf(boolean b)
Return the tristate value for the boolean (YES or NO).

Parameters:
b - The boolean
Returns:
YES if the boolean is true, NO if it is false.

toString

public String toString()
Overrides:
toString in class Enum<TriState>