|
|||||||||
| 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.UnaryFunctor<T,V>
net.sf.jga.fn.adaptor.ConstantUnary<T,V>
public class ConstantUnary<T,V>
Functor that returns the constant value given at construction.
To Serialize a ConstantUnary, the generic parameter V must be serializable.
Copyright © 2003-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
ConstantUnary.Visitor
Interface for classes that may interpret a ConstantUnary functor. |
| Constructor Summary | |
|---|---|
ConstantUnary(V val)
Builds a Constant functor for the given value. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(ConstantUnary) method, if it
implements the nested Visitor interface. |
V |
fn(T unused)
Given one argument, summarily ignores it and returns the constant value given at construction. |
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 ConstantUnary(V val)
| Method Detail |
|---|
public V fn(T unused)
fn in class UnaryFunctor<T,V>public void accept(Visitor v)
visit(ConstantUnary) method, if it
implements the nested Visitor interface.
accept in interface Visitableaccept 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 | ||||||||