|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.BinaryFunctor<java.util.Iterator<? extends T1>,java.util.Iterator<? extends T2>,java.util.Iterator<R>>
net.sf.jga.fn.algorithm.TransformBinary<T1,T2,R>
public class TransformBinary<T1,T2,R>
Applies a BinaryFunctor to corresponding elements in a pair of iterations, and iterates over the results.
Copyright © 2003 David A. Hall
| Nested Class Summary | |
|---|---|
static 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. |
java.util.Iterator<R> |
fn(java.util.Iterator<? extends T1> i1,
java.util.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. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.BinaryFunctor |
|---|
bind, bind1st, bind2nd, compose, compose, distribute, generate, generate1st, generate2nd |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TransformBinary(BinaryFunctor<T1,T2,R> fn)
java.lang.IllegalArgumentException - if the functor is null| Method Detail |
|---|
public BinaryFunctor<T1,T2,R> getFunction()
public java.util.Iterator<R> fn(java.util.Iterator<? extends T1> i1,
java.util.Iterator<? extends T2> i2)
fn in class BinaryFunctor<java.util.Iterator<? extends T1>,java.util.Iterator<? extends T2>,java.util.Iterator<R>>public void accept(Visitor v)
visit(Transform) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class BinaryFunctor<java.util.Iterator<? extends T1>,java.util.Iterator<? extends T2>,java.util.Iterator<R>>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||