edu.jas.util
Class ArrayUtil

java.lang.Object
  extended by edu.jas.util.ArrayUtil

public class ArrayUtil
extends java.lang.Object

Array utilities. For example copyOf from Java 6. Note: unused at the moment since it is not working in Java 5.

Author:
Heinz Kredel

Constructor Summary
ArrayUtil()
           
 
Method Summary
static
<T> T[]
copyOf(T[] original)
          Copy the specified array.
static
<T> T[]
copyOf(T[] original, int newLength)
          Copy the specified array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayUtil

public ArrayUtil()
Method Detail

copyOf

public static <T> T[] copyOf(T[] original,
                             int newLength)
Copy the specified array.

Parameters:
original - array.
newLength - new array length.
Returns:
copy of original.

copyOf

public static <T> T[] copyOf(T[] original)
Copy the specified array.

Parameters:
original - array.
Returns:
copy of original.