KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > jms > client > BrowserEnumeration


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.jms.client;
8
9 import java.util.Enumeration JavaDoc;
10 import java.util.List JavaDoc;
11 import java.util.ListIterator JavaDoc;
12
13 /**
14  * A browser enumeration
15  *
16  * @author <a HREF="mailto:adrian@jboss.org>Adrian Brock</a>
17  * @version $Revision: 1.1 $
18  */

19 class BrowserEnumeration
20    implements Enumeration JavaDoc
21 {
22    // Constants -----------------------------------------------------
23

24    // Attributes ----------------------------------------------------
25

26    /** The list iterator */
27    private ListIterator JavaDoc iterator;
28
29     // Static --------------------------------------------------------
30

31    // Constructors --------------------------------------------------
32

33    // Public --------------------------------------------------------
34

35    /**
36     * Create a new BrowserEnumeration
37     *
38     * @param list the list
39     */

40    public BrowserEnumeration(List JavaDoc list)
41    {
42       iterator = list.listIterator();
43    }
44
45    // Enumeration implementation ------------------------------------
46

47    public boolean hasMoreElements()
48    {
49       return iterator.hasNext();
50    }
51
52    public Object JavaDoc nextElement()
53    {
54       return iterator.next();
55    }
56
57    // Protected ------------------------------------------------------
58

59    // Package Private ------------------------------------------------
60

61    // Private --------------------------------------------------------
62

63    // Inner Classes --------------------------------------------------
64

65 }
66
Popular Tags