public class IntUtils
extends java.lang.Object
int
.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 java.lang.Integer |
toObject(int value)
Wraps an
int with an Object wrapper. |
static int |
toPrimitive(java.lang.Object value)
Unwraps the
Integer to retrieve the primitive int . |
static int[] |
toPrimitiveArray(java.util.Collection<?> coll)
Unwraps a
Collection to retrieve the primitive int . |
public static java.lang.Integer toObject(int value)
int
with an Object wrapper.value
- the primitive valuepublic static int toPrimitive(java.lang.Object value)
Integer
to retrieve the primitive int
.value
- the Object wrapper, must not be nulljava.lang.NullPointerException
- if the value if nulljava.lang.ClassCastException
- if the object is not Integer
public static int[] toPrimitiveArray(java.util.Collection<?> coll)
Collection
to retrieve the primitive int
.coll
- the Collection of Integer, must not be nulljava.lang.NullPointerException
- if the collection if nulljava.lang.ClassCastException
- if any object is not Integer
Copyright © 2005–2018 Joda.org. All rights reserved.