org.joda.primitives
Class BooleanUtils

java.lang.Object
  extended by org.joda.primitives.BooleanUtils

public class BooleanUtils
extends Object

Provides utility methods and constants for boolean.

Since:
1.0
Version:
CODE GENERATED
Author:
Stephen Colebourne, Jason Tiscione

Field Summary
static boolean[] EMPTY_BOOLEAN_ARRAY
          Immutable empty array.
 
Constructor Summary
BooleanUtils()
          Constructor that should not usually be used.
 
Method Summary
static Boolean toObject(boolean value)
          Wraps an boolean with an Object wrapper.
static boolean toPrimitive(Object value)
          Unwraps the Boolean to retrieve the primitive boolean.
static boolean[] toPrimitiveArray(Collection<?> coll)
          Unwraps a Collection to retrieve the primitive boolean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_BOOLEAN_ARRAY

public static final boolean[] EMPTY_BOOLEAN_ARRAY
Immutable empty array.

Constructor Detail

BooleanUtils

public BooleanUtils()
Constructor that should not usually be used.

Method Detail

toObject

public static Boolean toObject(boolean value)
Wraps an boolean with an Object wrapper.

Parameters:
value - the primitive value
Returns:
the Object wrapper

toPrimitive

public static boolean toPrimitive(Object value)
Unwraps the Boolean to retrieve the primitive boolean.

Parameters:
value - the Object wrapper, must not be null
Returns:
the primitive value
Throws:
NullPointerException - if the value if null
ClassCastException - if the object is not Boolean

toPrimitiveArray

public static boolean[] toPrimitiveArray(Collection<?> coll)
Unwraps a Collection to retrieve the primitive boolean.

Parameters:
coll - the Collection of Boolean, must not be null
Returns:
the primitive value array
Throws:
NullPointerException - if the collection if null
ClassCastException - if any object is not Boolean


Copyright © 2005-2010 Joda.org. All Rights Reserved.