|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.fn.Functor<R> net.sf.jga.fn.UnaryFunctor<T2,R> net.sf.jga.fn.adaptor.Generate1st<T1,T2,R>
public class Generate1st<T1,T2,R>
UnaryFunctor that uses a Generator to produce the 1st argument to a given BinaryFunctor.
Copyright © 2004-2005 David A. Hall
Nested Class Summary | |
---|---|
static interface |
Generate1st.Visitor
Interface for classes that may interpret a Generate1st functor. |
Constructor Summary | |
---|---|
Generate1st(BinaryFunctor<T1,T2,R> fn,
Generator<T1> gen)
|
Method Summary | |
---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Generate1st) method, if it
implements the nested Visitor interface. |
R |
fn(T2 arg)
Returns the results of the functor, using the nested generator to produce the first argument. |
BinaryFunctor<T1,T2,R> |
getFunctor()
Returns the Functor that is invoked |
Generator<T1> |
getGenerator()
Returns the generator that produces the 1st argument. |
java.lang.String |
toString()
|
Methods inherited from class net.sf.jga.fn.UnaryFunctor |
---|
bind, bind0th, bindNth, compose, compose, compose, composeNth, composeNth, eval, generate, generateNth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Generate1st(BinaryFunctor<T1,T2,R> fn, Generator<T1> gen)
Method Detail |
---|
public BinaryFunctor<T1,T2,R> getFunctor()
public Generator<T1> getGenerator()
public R fn(T2 arg)
fn
in class UnaryFunctor<T2,R>
public void accept(Visitor v)
visit(Generate1st)
method, if it
implements the nested Visitor interface.
accept
in interface Visitable
accept
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 |