public class ArrayUtils extends Object
Operations on arrays, primitive arrays (like int[]) and
primitive wrapper arrays (like Integer[]).
This class tries to handle null input gracefully.
An exception will not be thrown for a null
array input. However, an Object array that contains a null
element may throw an exception. Each method documents its behaviour.
| Modifier and Type | Field and Description |
|---|---|
static long[] |
EMPTY_LONG_ARRAY
An empty immutable
long array. |
| Constructor and Description |
|---|
ArrayUtils() |
| Modifier and Type | Method and Description |
|---|---|
static long[] |
toPrimitive(Long[] array)
Converts an array of object Longs to primitives.
|
public static final long[] EMPTY_LONG_ARRAY
long array.public static long[] toPrimitive(Long[] array)
Converts an array of object Longs to primitives.
This method returns null for a null input array.
array - a Long array, may be nulllong array, null if null array inputNullPointerException - if array content is nullCopyright © 2024 The Apache Software Foundation. All rights reserved.