public abstract class DataUtils extends Object
Modifier and Type | Method and Description |
---|---|
static double |
getValueOrDefault(Number n,
double defaultValue)
Returns the double value of the
Number object or the specified
default value if the object is null . |
static <K,V> Map<K,V> |
map(K[] keys,
V[] values)
Creates a mapping from two arrays, one with keys, one with values.
|
public static <K,V> Map<K,V> map(K[] keys, V[] values)
K
- Data type of the keys.V
- Data type of the values.keys
- Array containing the keys.values
- Array containing the values.public static double getValueOrDefault(Number n, double defaultValue)
Number
object or the specified
default value if the object is null
.n
- Number object.defaultValue
- Default value.Number
object or the default value
if the object is null
Copyright © 2009-2013. All Rights Reserved.