|
|||||||||
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.Generator<V> net.sf.jga.fn.adaptor.Constant<V>
public class Constant<V>
Functor that returns the constant value given at construction.
Copyright © 2003-2005 David A. Hall
Nested Class Summary | |
---|---|
static interface |
Constant.Visitor
Interface for classes that may interpret a Constant generator. |
Constructor Summary | |
---|---|
Constant(V val)
Builds a Constant functor for the given value. |
Method Summary | |
---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Constant) method, if it
implements the nested Visitor interface. |
V |
fn()
Returns the constant value given at construction |
java.lang.String |
toString()
|
Methods inherited from class net.sf.jga.fn.Generator |
---|
bind0th, bindNth, eval |
Methods inherited from class net.sf.jga.fn.Functor |
---|
composeNth, composeNth, generateNth |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Constant(V val)
Method Detail |
---|
public V fn()
fn
in class Generator<V>
public void accept(Visitor v)
visit(Constant)
method, if it
implements the nested Visitor interface.
accept
in interface Visitable
accept
in class Functor<V>
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 |