Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Collection; public class Main { public final static <T> void Append(Collection<T> collection, T[] array) { if (collection != null && array != null && array.length > 0) { for (T element : array) { collection.add(element); } } } public final static <T> void Append(Collection<T> collection, T[][] array_array) { if (collection != null && array_array != null && array_array.length > 0) { for (T[] array : array_array) { Append(collection, array); } } } }