net.ericaro.neoitertools.generators
Class IteratorGenerator<T>

java.lang.Object
  extended by net.ericaro.neoitertools.generators.IteratorGenerator<T>
All Implemented Interfaces:
Generator<T>

public class IteratorGenerator<T>
extends java.lang.Object
implements Generator<T>

A Generator using java Iterator as source.

Author:
eric
See Also:
IteratorGenerator's wiki page, neoitertools site

Constructor Summary
IteratorGenerator(java.util.Iterator<T> iterator)
           
 
Method Summary
 T next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IteratorGenerator

public IteratorGenerator(java.util.Iterator<T> iterator)
Method Detail

next

public T next()
       throws java.util.NoSuchElementException
Specified by:
next in interface Generator<T>
Returns:
the next item in the sequence.
Throws:
java.util.NoSuchElementException - when sequence is exhausted.


Copyright © 2011. All Rights Reserved.