Modifier and Type | Field and Description |
---|---|
static int[] |
EMPTY_INT_ARRAY
Immutable empty array.
|
Constructor and Description |
---|
IntUtils()
Constructor that should not usually be used.
|
Modifier and Type | Method and Description |
---|---|
static Integer |
toObject(int value)
Wraps an
int with an Object wrapper. |
static int |
toPrimitive(Object value)
Unwraps the
Integer to retrieve the primitive int . |
static int[] |
toPrimitiveArray(Collection<?> coll)
Unwraps a
Collection to retrieve the primitive int . |
public static final int[] EMPTY_INT_ARRAY
public IntUtils()
public static Integer toObject(int value)
int
with an Object wrapper.value
- the primitive valuepublic static int toPrimitive(Object value)
Integer
to retrieve the primitive int
.value
- the Object wrapper, must not be nullNullPointerException
- if the value if nullClassCastException
- if the object is not Integer
public static int[] toPrimitiveArray(Collection<?> coll)
Collection
to retrieve the primitive int
.coll
- the Collection of Integer, must not be nullNullPointerException
- if the collection if nullClassCastException
- if any object is not Integer
Copyright © 2005-2012 Joda.org. All Rights Reserved.