/** * A simple test of linear structures. Adds all the objects in the * parameter list to the given structure, and then prints out the * elements in order. */ public class LinearTester { public LinearTester(Linear linear, Object[] objects) { SimpleOutput out = new SimpleOutput(); // Add everything. for (int i = 0; i < objects.length; ++i) linear.add(objects[i]); // Delete everything, printing as we go. while (!linear.isEmpty()) out.println(linear.delete().toString()); } // LinearTester(Linear, Object[]) } // class LinearTester