org.translet.helper
Class MathUtils
java.lang.Object
|
+--org.translet.helper.MathUtils
- public class MathUtils
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MathUtils
public MathUtils()
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).