Beispiel #1
0
 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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 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;
 }
Beispiel #4
0
 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;
 }
Beispiel #5
0
 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;
 }