public class LongUtils
extends java.lang.Object
long
.Modifier and Type | Field and Description |
---|---|
static long[] |
EMPTY_LONG_ARRAY
Immutable empty array.
|
Constructor and Description |
---|
LongUtils()
Constructor that should not usually be used.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Long |
toObject(long value)
Wraps an
long with an Object wrapper. |
static long |
toPrimitive(java.lang.Object value)
Unwraps the
Long to retrieve the primitive long . |
static long[] |
toPrimitiveArray(java.util.Collection<?> coll)
Unwraps a
Collection to retrieve the primitive long . |
public static java.lang.Long toObject(long value)
long
with an Object wrapper.value
- the primitive valuepublic static long toPrimitive(java.lang.Object value)
Long
to retrieve the primitive long
.value
- the Object wrapper, must not be nulljava.lang.NullPointerException
- if the value if nulljava.lang.ClassCastException
- if the object is not Long
public static long[] toPrimitiveArray(java.util.Collection<?> coll)
Collection
to retrieve the primitive long
.coll
- the Collection of Long, must not be nulljava.lang.NullPointerException
- if the collection if nulljava.lang.ClassCastException
- if any object is not Long
Copyright © 2005–2018 Joda.org. All rights reserved.