org.translet.helper
Class MathUtils

java.lang.Object
  |
  +--org.translet.helper.MathUtils

public class MathUtils
extends Object


Constructor Summary
MathUtils()
           
 
Method Summary
static Object evaluateOperation(String sleft, String operator, String sright)
          Takes two strings and an operator that acts on the two strings and evaluates the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MathUtils

public MathUtils()
Method Detail

evaluateOperation

public static Object evaluateOperation(String sleft,
                                       String operator,
                                       String sright)
                                throws NumberFormatException
Takes two strings and an operator that acts on the two strings and evaluates the operation.

Ex:

Throws:
NumberFormatException - if the left or right value can't be converted into a number (int/double).