//: net/mindview/util/Generated.java package net.mindview.util; import java.util.*; public class Generated { // Fill an existing array: public static T[] array(T[] a, Generator gen) { return new CollectionData(gen, a.length).toArray(a); } // Create a new array: @SuppressWarnings("unchecked") public static T[] array(Class type, Generator gen, int size) { T[] a = (T[])java.lang.reflect.Array.newInstance(type, size); return new CollectionData(gen, size).toArray(a); } } ///:~