This project has retired. For details please refer to its
Attic page .
DoFnIterator (Apache Crunch 0.9.0 API)
org.apache.crunch.util
Class DoFnIterator<S,T>
java.lang.Object
org.apache.crunch.util.DoFnIterator<S,T>
Type Parameters: S - The type of the delegate iteratorT - The returned type
All Implemented Interfaces: Iterator <T>
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.
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
DoFnIterator
public DoFnIterator (Iterator <S > iter,
DoFn <S ,T > fn)
hasNext
public boolean hasNext ()
Specified by: hasNext in interface Iterator <T >
next
public T next ()
Specified by: next in interface Iterator <T >
remove
public void remove ()
Specified by: remove in interface Iterator <T >
Copyright © 2014 The Apache Software Foundation . All Rights Reserved.