com.elegantj.data.parser.postfixmathcommand
Class Sign
java.lang.Object
com.elegantj.data.parser.postfixmathcommand.PostfixMathCommand
com.elegantj.data.parser.postfixmathcommand.Sign
- All Implemented Interfaces:
- PostfixMathCommandI
- public class Sign
- extends PostfixMathCommand
Calculates the signature of the value
For example, if value is -10.89 it returns -1 ,if 10.89 it returns 1, if 0 it returns 0
Command Method ->
int sign(double d) : d - a double value to be observed, return -1,0,1 for negative,zero,positive.
|
Constructor Summary |
Sign()
|
|
Method Summary |
void |
run(java.util.Stack inStack)
Determines the node execution with the stack of arguments and store the result back to the stack. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Sign
public Sign()
run
public void run(java.util.Stack inStack)
throws CommandFailedException,
ArgumentRequiredException,
InvalidArgumentException
- Description copied from interface:
PostfixMathCommandI
- Determines the node execution with the stack of arguments and store the result back to the stack.
- Parameters:
inStack - the stack of the arguments
- Throws:
CommandFailedException
ArgumentRequiredException
InvalidArgumentException
Submit a bug or feature
Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.