public class DoubleUtils extends Object
double.| Modifier and Type | Field and Description |
|---|---|
static double[] |
EMPTY_DOUBLE_ARRAY
Immutable empty array.
|
| Constructor and Description |
|---|
DoubleUtils()
Constructor that should not usually be used.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
public static final double[] EMPTY_DOUBLE_ARRAY
public DoubleUtils()
public static Double toObject(double value)
double with an Object wrapper.value - the primitive valuepublic static double toPrimitive(Object value)
Double to retrieve the primitive double.value - the Object wrapper, must not be nullNullPointerException - if the value if nullClassCastException - if the object is not Doublepublic static double[] toPrimitiveArray(Collection<?> coll)
Collection to retrieve the primitive double.coll - the Collection of Double, must not be nullNullPointerException - if the collection if nullClassCastException - if any object is not DoubleCopyright © 2005-2012 Joda.org. All Rights Reserved.