org.kuali.rice.core.api.util
Enum Truth

java.lang.Object
  extended by java.lang.Enum<Truth>
      extended by org.kuali.rice.core.api.util.Truth
All Implemented Interfaces:
Serializable, Comparable<Truth>

public enum Truth
extends Enum<Truth>


Enum Constant Summary
FALSE
           
TRUE
           
 
Method Summary
 Collection<String> getTruthStrings()
           
static Boolean strToBooleanIgnoreCase(String str)
          Returns the Boolean value of a string ignoring case.
static Boolean strToBooleanIgnoreCase(String str, Boolean defaultValue)
          Returns the Boolean value of a string ignoring case.
static Truth valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Truth[] 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

TRUE

public static final Truth TRUE

FALSE

public static final Truth FALSE
Method Detail

values

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

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

valueOf

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

getTruthStrings

public Collection<String> getTruthStrings()

strToBooleanIgnoreCase

public static Boolean strToBooleanIgnoreCase(String str)
Returns the Boolean value of a string ignoring case. If the string is not a recognized boolean value, then this method will return null. If the str is null, this method will return null.

Parameters:
str - the string.
Returns:
the boolean value or null.

strToBooleanIgnoreCase

public static Boolean strToBooleanIgnoreCase(String str,
                                             Boolean defaultValue)
Returns the Boolean value of a string ignoring case. If the string is not a recognized boolean value, then this method will return null. If the str is null, this method will return null.

Parameters:
str - the string.
defaultValue - default value to use when the str is not a recognized as a boolean value.
Returns:
the boolean value or the specified default value.


Copyright © 2005–2014 The Kuali Foundation. All rights reserved.