|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.jep.functions.PostfixMathCommand
com.singularsys.jep.functions.Round
public class Round
A PostfixMathCommandI which rounds a number. round(pi) finds the closest integer to the argument round(p1,3) rounds the argument to 3 decimal places
Field Summary |
---|
Fields inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
curNumberOfParameters, name, NaN, numberOfParameters |
Constructor Summary | |
---|---|
Round()
|
Method Summary | |
---|---|
boolean |
checkNumberOfParameters(int n)
Must have one or more parameter |
java.lang.Object |
round(java.lang.Object param)
|
void |
run(java.util.Stack<java.lang.Object> inStack)
Run the function on the stack. |
Methods inherited from class com.singularsys.jep.functions.PostfixMathCommand |
---|
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkStack, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Round()
Method Detail |
---|
public boolean checkNumberOfParameters(int n)
checkNumberOfParameters
in interface PostfixMathCommandI
checkNumberOfParameters
in class PostfixMathCommand
n
- number of parameters function will be called with.
public void run(java.util.Stack<java.lang.Object> inStack) throws EvaluationException
PostfixMathCommandI
EvaluationException
public java.lang.Object round(java.lang.Object param) throws EvaluationException
EvaluationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |