|
|||||||||
| 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.UnaryFunctor<T,T>
net.sf.jga.fn.arithmetic.Negate<T>
public class Negate<T extends java.lang.Number>
Returns the negative of its numeric argument.
Copyright © 2003-2005 David A. Hall
| Nested Class Summary | |
|---|---|
static interface |
Negate.Visitor
Interface for classes that may interpret a Negate functor. |
| Constructor Summary | |
|---|---|
Negate(java.lang.Class<T> c)
Builds Negate functor for the given class. |
|
| Method Summary | |
|---|---|
void |
accept(Visitor v)
Calls the Visitor's visit(Negate) method, if it implements
the nested Visitor interface. |
T |
fn(T x)
Given numeric argument x, returns -x |
java.lang.Class<T> |
getType()
Returns the type of operands this instance supports |
java.lang.String |
toString()
|
| Methods inherited from class net.sf.jga.fn.UnaryFunctor |
|---|
bind, bind0th, bindNth, compose, compose, compose, composeNth, composeNth, eval, generate, generateNth |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Negate(java.lang.Class<T> c)
java.lang.IllegalArgumentException - if the given class has no Arithmetic
implementation registered with the ArithmeticFactory| Method Detail |
|---|
public java.lang.Class<T> getType()
public T fn(T x)
fn in class UnaryFunctor<T extends java.lang.Number,T extends java.lang.Number>public void accept(Visitor v)
visit(Negate) method, if it implements
the nested Visitor interface.
accept in interface Visitableaccept in class Functor<T extends java.lang.Number>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 | ||||||||