Package edu.jas.util

Class 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

      Constructors 
      Constructor Description
      ArrayUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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
    • 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.