|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.cm.frw.core.fun.impl.Function de.cm.frw.core.fun.impl.NUM.Unary
public abstract static class NUM.Unary
Class to simplify the definition of numerical with one argument.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.cm.frw.core.fun.impl.Function |
---|
Function.InvalidArguments |
Method Summary | |
---|---|
void |
checkArguments(java.util.Collection args)
Override this method to check conditions on the arguments (like types) passed to the function in apply before the operate method is called. |
java.lang.Object |
operate(java.lang.Object[] operands)
Override this to implement the actual operation realized by this function. |
Methods inherited from class de.cm.frw.core.fun.impl.Function |
---|
apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, apply, arity, box, box, box, box, box, box, box, box, box, box, box, box, box, box, box, is, main, map, map, reduce, unbox, val |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void checkArguments(java.util.Collection args) throws Function.InvalidArguments
Function
checkArguments
in class Function
Function.InvalidArguments
public java.lang.Object operate(java.lang.Object[] operands) throws Function.InvalidArguments
Function
Remember to document the number and types of the operands
and any other conditions for running the operate method.
Or implement checkArguments
instead.
Default implementation returns first argument passed in, realizing sort of an unary identity function.
operate
in class Function
operands
- An array of the arguments that where passed to apply
Function.InvalidArguments
- when you implement it to do so ...
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |