JAPI 0_6-alpha-2
Yet another Java API
API Documentation

net.sf.japi.util
Class EnumerationIterator<T>

java.lang.Object
  extended by net.sf.japi.util.EnumerationIterator<T>
All Implemented Interfaces:
Iterable<T>, Iterator<T>

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

Combined Iterator/Iterable proxy for enumerations. Instances are not reusable.

Author:
Christian Hujer

Constructor Summary
EnumerationIterator(Enumeration<T> enumeration)
          Create an Iterable based on an Enumeration, useful for foreach-loops.
 
Method Summary
 boolean hasNext()
          
 Iterator<T> iterator()
          
 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> enumeration)
Create an Iterable based on an Enumeration, useful for foreach-loops.

Parameters:
enumeration - Enumeration to iterate over
Method Detail

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()
       throws NoSuchElementException

Specified by:
next in interface Iterator<T>
Throws:
NoSuchElementException

remove

public void remove()

Specified by:
remove in interface Iterator<T>

JAPI
Yet another Java API
API Documentation

© 2005-2006 Christian Hujer. All rights reserved. See copyright