aQute.lib.collections
Class EnumerationIterator<T>

java.lang.Object
  extended by aQute.lib.collections.EnumerationIterator<T>
Type Parameters:
T -
All Implemented Interfaces:
Iterable<T>, Iterator<T>

public class EnumerationIterator<T>
extends Object
implements Iterable<T>, Iterator<T>

Simple facade for enumerators so they can be used in for loops.


Constructor Summary
EnumerationIterator(Enumeration<T> e)
           
 
Method Summary
 boolean hasNext()
           
 Iterator<T> iterator()
           
static
<T> EnumerationIterator<T>
iterator(Enumeration<T> e)
           
 T next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumerationIterator

public EnumerationIterator(Enumeration<T> e)
Method Detail

iterator

public static <T> EnumerationIterator<T> iterator(Enumeration<T> e)

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>

next

public T next()
Specified by:
next in interface Iterator<T>

remove

public void remove()
Specified by:
remove in interface Iterator<T>


Copyright © 2014 aQute SARL. All rights reserved.