KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > commons > utils > EnumIterator


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5
6 package org.exoplatform.commons.utils;
7
8 import java.util.Iterator JavaDoc;
9 import java.util.Enumeration JavaDoc;
10
11 /**
12  * @author Ove Ranheim (oranheim@users.sourceforge.net)
13  * @since Nov 9, 2003 4:01:29 PM
14  */

15 public class EnumIterator implements Iterator JavaDoc
16 {
17     private Enumeration JavaDoc p_enum;
18     
19     public EnumIterator( Enumeration JavaDoc e )
20     {
21         p_enum = e;
22     }
23     
24     public boolean hasNext()
25     {
26         return p_enum.hasMoreElements();
27     }
28     
29     public Object JavaDoc next()
30     {
31         return p_enum.nextElement();
32     }
33     
34     public void remove()
35     {
36         throw new UnsupportedOperationException JavaDoc();
37     }
38 }
39
Popular Tags