|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjwo.utils.expression.MathParser
Converts a mathematical expression (using 'normal' infix ordering) into a postfixed stack. Used for evaluation of mathematical expressions. Modified from original code described at www.devx.com/premier/mgznarch/javapro/2001/05may01/ps0105/ps0105.asp. Modifications allow unary operators (e.g. trig functions) to be parsed.
| Constructor Summary | |
MathParser()
|
|
| Method Summary | |
Stack |
parse(String input)
Parses an mathematical infix expression storing the operators and operands on a postfixed processing stack. |
boolean |
usesZ1()
Reports whether a 'z1' substitution has been made. |
boolean |
usesZ2()
Reports whether a 'z2' substitution has been made. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MathParser()
| Method Detail |
public Stack parse(String input)
throws ParseException
input - Mathematical expression to store.
ParseExceptionpublic boolean usesZ1()
public boolean usesZ2()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||