org.joda.primitives
Class ShortUtils

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

public class ShortUtils
extends Object

Provides utility methods and constants for short.

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

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

Field Detail

EMPTY_SHORT_ARRAY

public static final short[] EMPTY_SHORT_ARRAY
Immutable empty array.

Constructor Detail

ShortUtils

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

Method Detail

toObject

public static Short toObject(short value)
Wraps an short with an Object wrapper.

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

toPrimitive

public static short toPrimitive(Object value)
Unwraps the Short to retrieve the primitive short.

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 Short

toPrimitiveArray

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

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


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