|
|||||||||
| 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.Generator<R>
public abstract class Generator<R>
Functor that takes no arguments and produces a single result. The result is not guaranteed to be the same each time the functor is called.
Copyright © 2004-2005 David A. Hall
| Constructor Summary | |
|---|---|
Generator()
|
|
| Method Summary | |
|---|---|
Functor<R> |
bind0th(java.lang.Object arg0,
java.lang.Object... args)
Binds the given values to this functor, starting from the first argument. |
Functor<R> |
bindNth(int idx,
java.lang.Object arg0,
java.lang.Object... args)
Binds the given values to this functor, starting from the given index. |
R |
eval(java.lang.Object... args)
Executes the function and returns the result. |
abstract R |
fn()
Generate one instance. |
| Methods inherited from class net.sf.jga.fn.Functor |
|---|
accept, composeNth, composeNth, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.jga.fn.Visitable |
|---|
accept |
| Constructor Detail |
|---|
public Generator()
| Method Detail |
|---|
public abstract R fn()
public R eval(java.lang.Object... args)
eval in class Functor<R>
public Functor<R> bind0th(java.lang.Object arg0,
java.lang.Object... args)
bind0th in class Functor<R>arg0 - args -
public Functor<R> bindNth(int idx,
java.lang.Object arg0,
java.lang.Object... args)
bindNth in class Functor<R>idx - arg0 - args -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||