org.jboss.webbeans.util
Class EnumerationIterator<T>

java.lang.Object
  extended by org.jboss.webbeans.util.EnumerationIterator<T>
All Implemented Interfaces:
java.util.Iterator<T>

public class EnumerationIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

An enumeration -> iterator adapter

Author:
Pete Muir

Constructor Summary
EnumerationIterator(java.util.Enumeration<T> e)
          Constructor
 
Method Summary
 boolean hasNext()
          Indicates if there are more items to iterate
 T next()
          Gets the next item
 void remove()
          Removes an item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationIterator

public EnumerationIterator(java.util.Enumeration<T> e)
Constructor

Parameters:
e - The enumeration
Method Detail

hasNext

public boolean hasNext()
Indicates if there are more items to iterate

Specified by:
hasNext in interface java.util.Iterator<T>
Returns:
True if more, false otherwise

next

public T next()
Gets the next item

Specified by:
next in interface java.util.Iterator<T>
Returns:
The next items

remove

public void remove()
Removes an item. Not supported

Specified by:
remove in interface java.util.Iterator<T>


Copyright © 2011. All Rights Reserved.