KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > sample > ReportList


1 /**
2  * Licensed under the Artistic License; you may not use this file
3  * except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://displaytag.sourceforge.net/license.html
7  *
8  * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */

12 package org.displaytag.sample;
13
14 import java.util.ArrayList JavaDoc;
15 import java.util.Collections JavaDoc;
16
17
18 /**
19  * Just a utility class for testing out the table and column tags. This List fills itself with objects and sorts them as
20  * though it where pulling data from a report. This list is used to show the various report oriented examples (such as
21  * grouping, callbacks, and data exports).
22  * @author epesh
23  * @author Fabrizio Giustina
24  * @version $Revision$ ($Author$)
25  */

26 public class ReportList extends ArrayList JavaDoc
27 {
28
29     /**
30      * D1597A17A6.
31      */

32     private static final long serialVersionUID = 899149338534L;
33
34     /**
35      * Creats a TestList that is filled with 20 ReportableListObject suitable for testing.
36      */

37     public ReportList()
38     {
39         super();
40
41         for (int j = 0; j < 20; j++)
42         {
43             add(new ReportableListObject());
44         }
45
46         Collections.sort(this);
47     }
48
49     /**
50      * Creates a TestList that is filled with [size] ReportableListObject suitable for testing.
51      * @param size int
52      */

53     public ReportList(int size)
54     {
55         super();
56
57         for (int j = 0; j < size; j++)
58         {
59             add(new ReportableListObject());
60         }
61
62         Collections.sort(this);
63     }
64 }
65
Popular Tags