Here you can find the source of mergeArrays(T[] items, T[]... added)
Parameter | Description |
---|---|
items | a parameter |
added | a parameter |
public static <T> void mergeArrays(T[] items, T[]... added)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w w w . ja v a 2 s .c o m*/ * add all added arrays to items * @param items * @param added */ public static <T> void mergeArrays(T[] items, T[]... added) { int index = 0; for (int i = 0; i < added.length; i++) { T[] item = added[i]; System.arraycopy(item, 0, items, index, item.length); index += item.length; } } }