com.sun.appserv.management.util.misc
Class ArrayUtil

java.lang.Object
  extended by com.sun.appserv.management.util.misc.ArrayUtil

public final class ArrayUtil
extends Object

Provides: - utility to check for equality


Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

arraysEqual

public static boolean arraysEqual(Object array1,
                                  Object array2)

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 array
startIndex - index of the first item
numItems -
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 array
items2 - 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 array
item - an item to append
Returns:
an array of the same type as items1, its elements first