org.joda.primitives
Class LongUtils

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

public class LongUtils
extends Object

Provides utility methods and constants for long.

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

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

Field Detail

EMPTY_LONG_ARRAY

public static final long[] EMPTY_LONG_ARRAY
Immutable empty array.

Constructor Detail

LongUtils

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

Method Detail

toObject

public static Long toObject(long value)
Wraps an long with an Object wrapper.

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

toPrimitive

public static long toPrimitive(Object value)
Unwraps the Long to retrieve the primitive long.

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 Long

toPrimitiveArray

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

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


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