public static @infix <T, N> N[] copy(T[] array, int newLength, Class<? extends N[]> newType) { return java.util.Arrays.<N, T>copyOf(array, newLength, newType); }
public static @infix <T> T[] copy(T[] array, int newLength) { return (T[]) java.util.Arrays.copyOf(array, newLength, array.getClass()); }