|
|||||||||
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<T,R> net.sf.jga.fn.adaptor.GenerateUnary<T,R>
public class GenerateUnary<T,R>
UnaryFunctor that returns the result of a nested Generator. The argument to the UnaryFunctor is ignored.
Copyright © 2004-2005 David A. Hall
Nested Class Summary | |
---|---|
static interface |
GenerateUnary.Visitor
Interface for classes that may interpret a GenerateUnary functor. |
Constructor Summary | |
---|---|
GenerateUnary(Generator<R> gen)
|
Method Summary | |
---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(GenerateUnary) method, if it
implements the nested Visitor interface. |
R |
fn(T arg)
Returns the results of invoking the generator. |
Generator<R> |
getGenerator()
Returns the generator whose results are returned. |
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 GenerateUnary(Generator<R> gen)
Method Detail |
---|
public Generator<R> getGenerator()
public R fn(T arg)
fn
in class UnaryFunctor<T,R>
public void accept(Visitor v)
visit(GenerateUnary)
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 |