net.ericaro.neoitertools.generators
Class MapGenerator<T,K>

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

public class MapGenerator<T,K>
extends java.lang.Object
implements Generator<K>

A Generator that apply a mapping Lambda function first.

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

Constructor Summary
MapGenerator(Lambda<? super T,K> map, Generator<T> source)
           
 
Method Summary
 K next()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapGenerator

public MapGenerator(Lambda<? super T,K> map,
                    Generator<T> source)
Method Detail

next

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


Copyright © 2011. All Rights Reserved.