| net.sf.jga.fn.adaptor.ConstantUnary
ConstantUnary | public class ConstantUnary extends UnaryFunctor (Code) | | 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
author: David A. Hall |
Constructor Summary | |
public | ConstantUnary(V val) Builds a Constant functor for the given value. |
Method Summary | |
public void | accept(net.sf.jga.fn.Visitor v) Calls the Visitor's visit(ConstantUnary) method, if it
implements the nested Visitor interface. | public V | fn(T unused) Given one argument, summarily ignores it and returns the constant value
given at construction. | public String | toString() |
serialVersionUID | final static long serialVersionUID(Code) | | |
ConstantUnary | public ConstantUnary(V val)(Code) | | Builds a Constant functor for the given value. The value may be null:
in that case, evaluating the functor will return null.
|
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(ConstantUnary) method, if it
implements the nested Visitor interface.
|
fn | public V fn(T unused)(Code) | | Given one argument, summarily ignores it and returns the constant value
given at construction. The argument will not be evaluated in any way by
this functor.
the constant value given at construction |
|
|