01: import java.util.*;
02: import java.awt.*;
03: 
04: public class UtilsTester
05: {
06:    public static void main(String[] args)
07:          throws InstantiationException, IllegalAccessException
08:    {
09:       ArrayList<String> ids = new ArrayList<String>(); 
10:       Utils.fill(ids, "default", 10);
11:       System.out.println(ids);
12: 
13:       ArrayList<Shape> shapes = new ArrayList<Shape>();
14:       Utils.fill(shapes, new Rectangle(5, 10, 20, 30), 2);
15:       System.out.println(shapes);
16: 
17:       ArrayList<Polygon> polys = new ArrayList<Polygon>();
18:       Utils.fillWithDefaults(polys, Polygon.class, 10);
19:       Utils.append(shapes, polys, 2);
20:       System.out.println(shapes);      
21: 
22:       ArrayList<GregorianCalendar> dates 
23:             = new ArrayList<GregorianCalendar>();
24:       Utils.fillWithDefaults(dates, GregorianCalendar.class, 5);
25:       System.out.println(Utils.getMax(dates));
26:    }
27: }