public class ArrayUtils extends Object
Modifier and Type  Field and Description 

static boolean[] 
EMPTY_BOOLEAN_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Boolean[] 
EMPTY_BOOLEAN_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static byte[] 
EMPTY_BYTE_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Byte[] 
EMPTY_BYTE_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static char[] 
EMPTY_CHAR_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Character[] 
EMPTY_CHAR_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static double[] 
EMPTY_DOUBLE_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Double[] 
EMPTY_DOUBLE_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static float[] 
EMPTY_FLOAT_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Float[] 
EMPTY_FLOAT_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static int[] 
EMPTY_INT_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Integer[] 
EMPTY_INT_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static long[] 
EMPTY_LONG_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Long[] 
EMPTY_LONG_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static short[] 
EMPTY_SHORT_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

static Short[] 
EMPTY_SHORT_OBJ_ARRAY
Instantiating a new 0 length array is *usually* inefficient, unless you
are doing reference comparisons later.

Constructor and Description 

ArrayUtils() 
Modifier and Type  Method and Description 

static <T> T[] 
asArray(Class<T> clazz,
List list)
Returns a new array, based on the runtime type of the list.

static Boolean[] 
box(boolean[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Byte[] 
box(byte[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Character[] 
box(char[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Double[] 
box(double[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Float[] 
box(float[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Integer[] 
box(int[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Long[] 
box(long[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static Short[] 
box(short[] array)
"Boxes" an array, that is, boxes all the primitives in the given array,
and returns a new "boxed" array.

static <T> T 
cast(Object array,
Class<T> toArrayClass)
Returns a new array, where each item has been cast to the
specified class, and the returned array is an array type
based on that class.

static boolean[] 
slice(boolean[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static byte[] 
slice(byte[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static char[] 
slice(char[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static double[] 
slice(double[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static float[] 
slice(float[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static int[] 
slice(int[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static long[] 
slice(long[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static short[] 
slice(short[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static <T> T[] 
slice(T[] array,
int start,
int finish)
Slices an array, where the array [0, 1, 2] sliced from 0 to 2 would return the whole array.

static boolean[] 
unbox(Boolean[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static byte[] 
unbox(Byte[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static char[] 
unbox(Character[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static double[] 
unbox(Double[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static float[] 
unbox(Float[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static int[] 
unbox(Integer[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static long[] 
unbox(Long[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

static short[] 
unbox(Short[] array)
"Unboxes" an array, that is, unboxes all the primitives in this
array, and returns a primitive array.

public static final char[] EMPTY_CHAR_ARRAY
public static final byte[] EMPTY_BYTE_ARRAY
public static final short[] EMPTY_SHORT_ARRAY
public static final int[] EMPTY_INT_ARRAY
public static final long[] EMPTY_LONG_ARRAY
public static final float[] EMPTY_FLOAT_ARRAY
public static final double[] EMPTY_DOUBLE_ARRAY
public static final boolean[] EMPTY_BOOLEAN_ARRAY
public static final Character[] EMPTY_CHAR_OBJ_ARRAY
public static final Byte[] EMPTY_BYTE_OBJ_ARRAY
public static final Short[] EMPTY_SHORT_OBJ_ARRAY
public static final Integer[] EMPTY_INT_OBJ_ARRAY
public static final Long[] EMPTY_LONG_OBJ_ARRAY
public static final Float[] EMPTY_FLOAT_OBJ_ARRAY
public static final Double[] EMPTY_DOUBLE_OBJ_ARRAY
public static final Boolean[] EMPTY_BOOLEAN_OBJ_ARRAY
public static <T> T[] slice(T[] array, int start, int finish)
T
 The array typearray
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static char[] slice(char[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static byte[] slice(byte[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static short[] slice(short[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static int[] slice(int[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static long[] slice(long[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static float[] slice(float[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static double[] slice(double[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static boolean[] slice(boolean[] array, int start, int finish)
array
 The array to be sliced. Note that the original array remains unchanged.start
 The starting node.finish
 The ending node (inclusive).public static char[] unbox(Character[] array)
array
 The "boxed" arraypublic static byte[] unbox(Byte[] array)
array
 The "boxed" arraypublic static short[] unbox(Short[] array)
array
 The "boxed" arraypublic static int[] unbox(Integer[] array)
array
 The "boxed" arraypublic static long[] unbox(Long[] array)
array
 The "boxed" arraypublic static float[] unbox(Float[] array)
array
 The "boxed" arraypublic static double[] unbox(Double[] array)
array
 The "boxed" arraypublic static boolean[] unbox(Boolean[] array)
array
 The "boxed" arraypublic static Character[] box(char[] array)
array
 The primitive arraypublic static Byte[] box(byte[] array)
array
 The primitive arraypublic static Short[] box(short[] array)
array
 The primitive arraypublic static Integer[] box(int[] array)
array
 The primitive arraypublic static Long[] box(long[] array)
array
 The primitive arraypublic static Float[] box(float[] array)
array
 The primitive arraypublic static Double[] box(double[] array)
array
 The primitive arraypublic static Boolean[] box(boolean[] array)
array
 The primitive arraypublic static <T> T[] asArray(Class<T> clazz, List list)
T
 list
 public static <T> T cast(Object array, Class<T> toArrayClass)
T
 array
 Despite being an Object, instead of an Object[], this will throw a ClassCastException
if it is not an array type.toClass
 Copyright © 20102013 Mostly Layton Smith. All Rights Reserved.