|
|||||||||
| 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.BinaryFunctor<T1,T2,V>
net.sf.jga.fn.adaptor.ConstantBinary<T1,T2,V>
public class ConstantBinary<T1,T2,V>
Functor that returns the constant value given at construction.
To Serialize a ConstantBinary, the generic parameter V must be serializable.
Copyright © 2003-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
ConstantBinary.Visitor
Interface for classes that may interpret a ConstantBinary functor. |
| Constructor Summary | |
|---|---|
ConstantBinary(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(T1 unused,
T2 ignored)
Given two arguments, ignores both and returns the constant value given at construction. |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.BinaryFunctor |
|---|
bind, bind0th, bind1st, bind2nd, bindNth, compose, compose, composeNth, distribute, eval, generate, generate1st, generate2nd, generateNth |
| Methods inherited from class net.sf.jga.fn.Functor |
|---|
composeNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ConstantBinary(V val)
| Method Detail |
|---|
public V fn(T1 unused,
T2 ignored)
fn in class BinaryFunctor<T1,T2,V>public void accept(Visitor v)
visit(Constant) 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 | ||||||||