net.sf.jga.fn.arithmetic
public class Multiplies<T extends Number> extends AbstractBinaryFunctor<T,T,T> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | Multiplies.Visitor
Interface for classes that may interpret a Multiplies functor. |
Constructor Summary | |
---|---|
Multiplies(Class c)
Builds Multiplies functor for the given class. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(Multiplies) method, if it
implements the nested Visitor interface. |
T | fn(T x, T y)
Given numeric arguments x and y, returns x * y |
String | toString() |
Throws: IllegalArgumentException if the given class has no Arithmetic implementation registered with the ArithmeticFactory
visit(Multiplies)
method, if it
implements the nested Visitor interface.Returns: the product of two numeric arguments