|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.canoo.webtest.util.Expression
public class Expression
Evaluates a mathematical expression.
| Constructor Summary | |
|---|---|
Expression()
Constructs a new blank expression |
|
Expression(Evaluator eval)
Constructor for the Expression object |
|
| Method Summary | |
|---|---|
double |
evaluate(String exp)
Evaluates the expression string and returns the result (which is also available with getValue()). |
static double |
evaluateExpression(String s)
Evaluates a string expression without requiring the creation of an instance. |
static double |
evaluateExpression(String s,
Evaluator eval)
Evaluates a string expression without requiring the creation of an instance. |
protected double |
evaluateString(String s)
Evaluates a string found in the expression which isn't an arithmetic expression. |
void |
setEvaluator(Evaluator evaluator)
Sets the Evaluator attribute of the Expression object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Expression()
public Expression(Evaluator eval)
eval - the fEvaluator to use for unknown expressions| Method Detail |
|---|
public void setEvaluator(Evaluator evaluator)
evaluator - The new Evaluator valuepublic double evaluate(String exp)
exp - the string to parse
IllegalArgumentExceptionprotected double evaluateString(String s)
s - the substring to evaluate
public static double evaluateExpression(String s)
s - the expression to evaluate
public static double evaluateExpression(String s,
Evaluator eval)
s - the expression to evaluateeval - the fEvaluator to parse special values
|
Copyright © 2001-2007 Canoo Engineering AG, Basel. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||