KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > displaytag > test > KnownNumberedList


1 package org.displaytag.test;
2
3 import java.util.ArrayList JavaDoc;
4 import java.util.Iterator JavaDoc;
5 import java.util.List JavaDoc;
6
7
8 /**
9  * Test data provider. A list of 5 NumberedItems.
10  * @author Fabrizio Giustina
11  * @version $Revision: 727 $ ($Author: fgiust $)
12  */

13 public class KnownNumberedList
14 {
15
16     /**
17      * Returns an iterator on a list made of 5 NumberedItems objects.
18      * @return iterator on a list made of 5 NumberedItems objects
19      */

20     public Iterator JavaDoc iterator()
21     {
22         List JavaDoc list = new ArrayList JavaDoc();
23         for (int j = 0; j < 5; j++)
24         {
25             list.add(new NumberedItem(j));
26         }
27         return list.iterator();
28     }
29 }
Popular Tags