Package org.glassfish.admin.amx.util
Class ArrayUtil
- java.lang.Object
-
- org.glassfish.admin.amx.util.ArrayUtil
-
public final class ArrayUtil extends Object
Provides: - utility to check for equality
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
arrayContainsNulls(Object[] array)
static boolean
arraysEqual(Object array1, Object array2)
static <T> T[]
newArray(Class<T> theClass, int numItems)
static <T> T[]
newArray(T[] items, int startIndex, int numItems)
Create a new array from the original.static <T> T[]
newArray(T[] items, T item)
Create a new array consisting of an original array, and a single new item.static <T> T[]
newArray(T[] items1, T[] items2)
Create a new array consisting of originals and new.
-
-
-
Method Detail
-
arrayContainsNulls
public static boolean arrayContainsNulls(Object[] array)
-
newArray
public static <T> T[] newArray(Class<T> theClass, int numItems)
-
newArray
public static <T> T[] newArray(T[] items, int startIndex, int numItems)
Create a new array from the original.- Parameters:
items
- the original arraystartIndex
- index of the first itemnumItems
-- Returns:
- an array of the same type, containing numItems items
-
newArray
public static <T> T[] newArray(T[] items1, T[] items2)
Create a new array consisting of originals and new.- Parameters:
items1
- 1st arrayitems2
- 2nd array- Returns:
- an array of the same type as items1, its elements first
-
newArray
public static <T> T[] newArray(T[] items, T item)
Create a new array consisting of an original array, and a single new item.- Parameters:
items
- an arrayitem
- an item to append- Returns:
- an array of the same type as items1, its elements first
-
-