net.sf.jga.fn.arithmetic
public class Minus<T extends Number> extends AbstractBinaryFunctor<T,T,T> implements Serializable
Copyright © 2003 David A. Hall
Nested Class Summary | |
---|---|
interface | Minus.Visitor
Interface for classes that may interpret a Minus functor. |
Constructor Summary | |
---|---|
Minus(Class c)
Builds Minus functor for the given class. |
Method Summary | |
---|---|
void | accept(Visitor v)
Calls the Visitor's visit(Minus) 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(Minus)
method, if it implements
the nested Visitor interface.Returns: the difference of two numeric arguments