| net.sf.jga.fn.arithmetic.ValueOf
ValueOf | public class ValueOf extends UnaryFunctor (Code) | | Returns the value of its numeric argument, converted to the approprate
class.
Copyright © 2004-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | ValueOf(Class<R> c) Builds ValueOf functor for the given class. |
serialVersionUID | final static long serialVersionUID(Code) | | |
ValueOf | public ValueOf(Class<R> c)(Code) | | Builds ValueOf functor for the given class. The class argument must
be the same as the generic class argument (when generics are in use)
or else a ClassCastException will be thrown when the functor is used.
throws: IllegalArgumentException - if the given class has no Arithmeticimplementation registered with the ArithmeticFactory |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(ValueOf) method, if it implements
the nested Visitor interface.
|
fn | public R fn(T x)(Code) | | Given numeric argument x, converts x to the type passed at construction
the converted version of its numeric argument |
|
|