KickJava   Java API By Example, From Geeks To Geeks.

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


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 4 unordered NumberedItems.
10  * @author Fabrizio Giustina
11  * @version $Revision: 727 $ ($Author: fgiust $)
12  */

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

20     public Iterator JavaDoc iterator()
21     {
22         List JavaDoc list = new ArrayList JavaDoc();
23         list.add(new NumberedItem(1));
24         list.add(new NumberedItem(4));
25         list.add(new NumberedItem(2));
26         list.add(new NumberedItem(3));
27         return list.iterator();
28     }
29 }
Popular Tags