public static int[] remove(int[] a, int i) { int[] tmp = Arrays.copyOf(a,a.length-1); System.arraycopy(a,i+1,tmp,i,tmp.length-i); return tmp; }
public static <T> T[] append(T[] a, T... b) { if( a==null ) return b; T[] tmp = Arrays.copyOf(a,a.length+b.length); System.arraycopy(b,0,tmp,a.length,b.length); return tmp; }
public static int[] append(int[] a, int[] b) { int[] res = new int[a.length + b.length]; System.arraycopy(a, 0, res, 0, a.length); System.arraycopy(b, 0, res, a.length, b.length); return res; }
public static String[] append(String[] a, String[] b) { String[] res = new String[a.length + b.length]; System.arraycopy(a, 0, res, 0, a.length); System.arraycopy(b, 0, res, a.length, b.length); return res; }
public static double[][] append(double[][] a, double[][] b) { double[][] res = new double[a.length + b.length][]; System.arraycopy(a, 0, res, 0, a.length); System.arraycopy(b, 0, res, a.length, b.length); return res; }