@@ -0,0 +1,995 @@
+/**%0A * %0A */%0Apackage mathsquared.resultswizard2;%0A%0Aimport java.lang.reflect.Array;%0Aimport java.util.Arrays;%0A%0A/**%0A * @author MathSquared%0A * %0A */%0Apublic class ArrayUtils %7B%0A    // HASHTAG UNCHECKED CASTS%0A    @SuppressWarnings(%22unchecked%22)%0A    public static %3CT%3E T%5B%5D%5B%5D deepCopyOf (T%5B%5D%5B%5D toCopy) %7B%0A        // Instantiate a generic array%0A        Class%3CT%5B%5D%3E type = (Class%3CT%5B%5D%3E) toCopy.getClass().getComponentType();%0A        T%5B%5D%5B%5D copied = (T%5B%5D%5B%5D) Array.newInstance(type, toCopy.length);%0A%0A        // If a two-dimensional array, use Arrays.copyOf; otherwise, recurse%0A        if (!(toCopy instanceof Object%5B%5D%5B%5D%5B%5D)) %7B // not 3-D; by parameter, must be 2-D%0A            for (int i = 0; i %3C toCopy.length; i++) %7B%0A                copied%5Bi%5D = Arrays.copyOf(toCopy%5Bi%5D, toCopy%5Bi%5D.length);%0A            %7D%0A        %7D else %7B // 3-D or above%0A            for (int i = 0; i %3C toCopy.length; i++) %7B%0A                copied%5Bi%5D = (T%5B%5D) deepCopyOf((Object%5B%5D%5B%5D) toCopy%5Bi%5D);%0A            %7D%0A        %7D%0A%0A        return copied;%0A    %7D%0A%7D%0A

Add ArrayUtils and deepCopyOf