This project has retired. For details please refer to its Attic page.
DoFnIterator (Apache Crunch 0.10.0 API)

Class DoFnIterator<S,T>

  extended by org.apache.crunch.util.DoFnIterator<S,T>
Type Parameters:
S - The type of the delegate iterator
T - The returned type
All Implemented Interfaces:

public class DoFnIterator<S,T>
extends Object
implements Iterator<T>

An Iterator<T> that combines a delegate Iterator<S> and a DoFn<S, T>, generating data by passing the contents of the iterator through the function. Note that the input DoFn should have both its setContext and initialize functions called before it is passed to the constructor.

Constructor Summary
DoFnIterator(Iterator<S> iter, DoFn<S,T> fn)
Method Summary
 boolean hasNext()
 T next()
 void remove()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public DoFnIterator(Iterator<S> iter,
                    DoFn<S,T> fn)
Method Detail


public boolean hasNext()
Specified by:
hasNext in interface Iterator<T>


public T next()
Specified by:
next in interface Iterator<T>


public void remove()
Specified by:
remove in interface Iterator<T>

Copyright © 2014 The Apache Software Foundation. All Rights Reserved.