List of utility methods to do Iterable to Array
List<T> array = new ArrayList<T>(); for (T e : elements) { array.add(e); return array.toArray(a);