org.joda.primitives
Class CharUtils

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

public class CharUtils
extends Object

Provides utility methods and constants for char.

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

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

Field Detail

EMPTY_CHAR_ARRAY

public static final char[] EMPTY_CHAR_ARRAY
Immutable empty array.

Constructor Detail

CharUtils

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

Method Detail

toObject

public static Character toObject(char value)
Wraps an char with an Object wrapper.

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

toPrimitive

public static char toPrimitive(Object value)
Unwraps the Character to retrieve the primitive char.

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 Character

toPrimitiveArray

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

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


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