net.sf.jga.fn.algorithm
public class TransformBinary<T1,T2,R> extends AbstractBinaryFunctor<Iterator<? extends T1>,Iterator<? extends T2>,Iterator<R>> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | TransformBinary.Visitor
Interface for classes that may interpret an Transform functor. |
Constructor Summary | |
---|---|
TransformBinary(BinaryFunctor<T1,T2,R> fn)
Builds an TransformBinary functor that will use the given functor to
process corresponding elements in a pair of iterations. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(Transform) method, if it
implements the nested Visitor interface. |
Iterator<R> | fn(Iterator<? extends T1> i1, Iterator<? extends T2> i2)
Apply the functor to corresponding elements in the iterations and return
an iterator over the results. |
BinaryFunctor<T1,T2,R> | getFunction()
Returns the functor used to process elements in a pair of iterations. |
String | toString() |
Throws: IllegalArgumentException if the functor is null
visit(Transform)
method, if it
implements the nested Visitor interface.Returns: an iterator over the results of the transformation