org.odata4j.core
Enum Boole

java.lang.Object
  extended by java.lang.Enum<Boole>
      extended by org.odata4j.core.Boole
All Implemented Interfaces:
Serializable, Comparable<Boole>

public enum Boole
extends Enum<Boole>

A custom Boolean class is necessary to support Boolean representations as defined in the OData standard.

The name of this class pays homage to George Boole (1815–1864).


Enum Constant Summary
FALSE
           
TRUE
           
 
Method Summary
static Boole fromString(String value)
          Convert a string value to Boole.
 Boolean toBoolean()
           
static Boole valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Boole[] 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, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FALSE

public static final Boole FALSE

TRUE

public static final Boole TRUE
Method Detail

fromString

public static Boole fromString(String value)
Convert a string value to Boole.

Parameters:
value - OData string representation of a boolean value.
Throws:
IllegalArgumentException - if value is not one of true, false, 1, or 0.

toBoolean

public Boolean toBoolean()

valueOf

public static Boole 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

values

public static Boole[] 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 (Boole c : Boole.values())
    System.out.println(c);

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


http://odata4j.org