ElegantJ Data Tables Java API Specification v1.1

com.elegantj.data.parser.postfixmathcommand
Class Truncate

java.lang.Object
  extended bycom.elegantj.data.parser.postfixmathcommand.PostfixMathCommand
      extended bycom.elegantj.data.parser.postfixmathcommand.Truncate
All Implemented Interfaces:
PostfixMathCommandI

public class Truncate
extends PostfixMathCommand

Truncates the double value
Command Method -> truncate


Constructor Summary
Truncate()
           
 
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.
static double truncate(double a, int n)
          Truncates the value to the specified scale For example, if value is 10.784565 and scale is 2 then it returns 10.79
 
Methods inherited from class com.elegantj.data.parser.postfixmathcommand.PostfixMathCommand
checkStack, getNumberOfParameters, getParameterTypes, getReturnType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Truncate

public Truncate()
Method Detail

truncate

public static double truncate(double a,
                              int n)
Truncates the value to the specified scale For example, if value is 10.784565 and scale is 2 then it returns 10.79

Parameters:
a - value to be truncated
n - scale of the truncation
Returns:
a truncated double value

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

ElegantJ Data Tables Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.