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

java.lang.Object
  extended by net.ericaro.neoitertools.generators.TeeGeneratorFactory<T>

public class TeeGeneratorFactory<T>
extends java.lang.Object

Creates n independent iterators from a single source sequence.

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

Nested Class Summary
 class TeeGeneratorFactory.TeeGenerator
           
 
Constructor Summary
TeeGeneratorFactory(Generator<T> source)
           
 
Method Summary
 Generator<T> newInstance()
          every iterator returned will start iterating over the source at its current position, this depend on the current state of every iterator.
protected  void tee()
          peek one value from the source, and push it in every buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeeGeneratorFactory

public TeeGeneratorFactory(Generator<T> source)
Method Detail

tee

protected void tee()
peek one value from the source, and push it in every buffer.


newInstance

public Generator<T> newInstance()
every iterator returned will start iterating over the source at its current position, this depend on the current state of every iterator.



Copyright © 2011. All Rights Reserved.