net.sf.staccatocommons.iterators
Class EnumerationIterator<A>

java.lang.Object
  extended by net.sf.staccatocommons.iterators.AbstractUnmodifiableIterator<A>
      extended by net.sf.staccatocommons.iterators.thriter.AbstractThriterator<A>
          extended by net.sf.staccatocommons.iterators.thriter.NextThriterator<A>
              extended by net.sf.staccatocommons.iterators.EnumerationIterator<A>
All Implemented Interfaces:
Iterator<A>, EmptyAware, Thriter<A>, Thriterator<A>

public class EnumerationIterator<A>
extends NextThriterator<A>

Author:
flbulgarelli

Constructor Summary
EnumerationIterator(Enumeration<? extends A> enumeration)
          Creates a new EnumerationIterator
 
Method Summary
 boolean hasNext()
          Answers if the thriter has more elements, that is, if sending Thriter.advanceNext() would not result in a NoSuchElementException
protected  A nextImpl()
           
 String toString()
           
 
Methods inherited from class net.sf.staccatocommons.iterators.thriter.NextThriterator
advanceNext, current, next
 
Methods inherited from class net.sf.staccatocommons.iterators.thriter.AbstractThriterator
delayedCurrent, delayedNext, isEmpty
 
Methods inherited from class net.sf.staccatocommons.iterators.AbstractUnmodifiableIterator
remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
remove
 

Constructor Detail

EnumerationIterator

public EnumerationIterator(@NonNull
                           Enumeration<? extends A> enumeration)
Creates a new EnumerationIterator

Method Detail

hasNext

public boolean hasNext()
Description copied from interface: Thriter
Answers if the thriter has more elements, that is, if sending Thriter.advanceNext() would not result in a NoSuchElementException

Returns:
if the Thriter has more elements

nextImpl

protected A nextImpl()
Specified by:
nextImpl in class NextThriterator<A>

toString

public String toString()
Overrides:
toString in class Object


Get Staccatocommons at SourceForge.net. Fast, secure and Free Open Source software downloads