|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.fn.Functor<R>
net.sf.jga.fn.adaptor.ComposeUnaryNth<R>
public class ComposeUnaryNth<R>
Functor that uses a Generator to produce the Nth argument to a given Functor. The generated result is inserted into the argument list given to this functor with the modified list being passed to the nested functor.
Copyright © 2009 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
ComposeUnaryNth.Visitor
Interface for classes that may interpret a Generate2nd functor. |
| Constructor Summary | |
|---|---|
ComposeUnaryNth(Functor<R> fn,
int idx,
UnaryFunctor<?,?> uf)
|
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Generate2nd) method, if it
implements the nested Visitor interface. |
R |
eval(java.lang.Object... args)
Returns the results of the functor, using the nested functor to modify the Nth argument. |
Functor<R> |
getFunctor()
Returns the Functor that is invoked |
UnaryFunctor<?,?> |
getUnaryFunctor()
Returns the generator that produces the indicated argument. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.Functor |
|---|
bind0th, bindNth, composeNth, composeNth, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComposeUnaryNth(Functor<R> fn,
int idx,
UnaryFunctor<?,?> uf)
| Method Detail |
|---|
public Functor<R> getFunctor()
public UnaryFunctor<?,?> getUnaryFunctor()
public R eval(java.lang.Object... args)
eval in class Functor<R>public void accept(Visitor v)
visit(Generate2nd) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept in class Functor<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 | ||||||||