|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.joda.primitives.IntUtils
public class IntUtils
Provides utility methods and constants for int.
| Field Summary | |
|---|---|
static int[] |
EMPTY_INT_ARRAY
Immutable empty array. |
| Constructor Summary | |
|---|---|
IntUtils()
Constructor that should not usually be used. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int[] EMPTY_INT_ARRAY
| Constructor Detail |
|---|
public IntUtils()
| Method Detail |
|---|
public static Integer toObject(int value)
int with an Object wrapper.
value - the primitive value
public static int toPrimitive(Object value)
Integer to retrieve the primitive int.
value - the Object wrapper, must not be null
NullPointerException - if the value if null
ClassCastException - if the object is not Integerpublic static int[] toPrimitiveArray(Collection<?> coll)
Collection to retrieve the primitive int.
coll - the Collection of Integer, must not be null
NullPointerException - if the collection if null
ClassCastException - if any object is not Integer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||