com.klg.jclass.util.formulae
Class Abs
java.lang.Object
|
+--com.klg.jclass.util.formulae.Operation
|
+--com.klg.jclass.util.formulae.Abs
- All Implemented Interfaces:
- Cloneable, Expression
- public class Abs
- extends Operation
This is a concrete implementation for the absolute value operation.
Absolute value is the positive magnitude of a number
This is a unary operator, *???but can also work on lists???*.
Constructor Summary |
Abs(com.klg.jclass.util.formulae.Expression operand)
Create an operation to compute the absolute value of the given Expression |
Abs(Number operand)
Create an operation to compute the absolute value of the given Number |
Method Summary |
com.klg.jclass.util.formulae.Result |
evaluate()
Return the absolute value of the given value |
Methods inherited from class com.klg.jclass.util.formulae.Operation |
clone |
Abs
public Abs(com.klg.jclass.util.formulae.Expression operand)
- Create an operation to compute the absolute value of the given Expression
Abs
public Abs(Number operand)
- Create an operation to compute the absolute value of the given Number
evaluate
public com.klg.jclass.util.formulae.Result evaluate()
- Return the absolute value of the given value
- Specified by:
evaluate
in interface Expression
- Specified by:
evaluate
in class Operation
- Returns:
- The absolute value of the given operand