| net.sf.jga.fn.algorithm.TransformBinary
TransformBinary | public class TransformBinary extends BinaryFunctor,Iterator extends T2>,Iterator> (Code) | | Applies a BinaryFunctor to corresponding elements in a pair of iterations,
and iterates over the results.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | 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 | |
public void | accept(net.sf.jga.fn.Visitor v) Calls the Visitor's visit(Transform) method, if it
implements the nested Visitor interface. | public 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. | public BinaryFunctor<T1, T2, R> | getFunction() Returns the functor used to process elements in a pair of iterations. | public String | toString() |
serialVersionUID | final static long serialVersionUID(Code) | | |
TransformBinary | public TransformBinary(BinaryFunctor<T1, T2, R> fn)(Code) | | Builds an TransformBinary functor that will use the given functor to
process corresponding elements in a pair of iterations.
throws: IllegalArgumentException - if the functor is null |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(Transform) method, if it
implements the nested Visitor interface.
|
fn | public Iterator<R> fn(Iterator<? extends T1> i1, Iterator<? extends T2> i2)(Code) | | Apply the functor to corresponding elements in the iterations and return
an iterator over the results. The resulting iterator will contain the
same number of elements as the shorter of the two input iterators (if
one of the input iterators is empty, then the resulting iterator will
also be empty).
an iterator over the results of the transformation |
getFunction | public BinaryFunctor<T1, T2, R> getFunction()(Code) | | Returns the functor used to process elements in a pair of iterations.
|
|
|