org.joda.primitives
Class DoubleUtils

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

public class DoubleUtils
extends Object

Provides utility methods and constants for double.

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

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

Field Detail

EMPTY_DOUBLE_ARRAY

public static final double[] EMPTY_DOUBLE_ARRAY
Immutable empty array.

Constructor Detail

DoubleUtils

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

Method Detail

toObject

public static Double toObject(double value)
Wraps an double with an Object wrapper.

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

toPrimitive

public static double toPrimitive(Object value)
Unwraps the Double to retrieve the primitive double.

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 Double

toPrimitiveArray

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

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


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