|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvec_math.Node<String>
vec_math.StringNode
vec_math.ExpressionNode
public class ExpressionNode
A node class for ExpressionParser. This node deals with Number
instances, i.e. Double and Long, and the Boolean class. Though internally
handled as objects, the final expression is always one of these types and
can readily be cast.
| Nested Class Summary | |
|---|---|
static class |
ExpressionNode.Test
Test purposes only. |
| Constructor Summary | |
|---|---|
ExpressionNode(String root)
Constructs a new top-level double node. |
|
ExpressionNode(StringNode parent,
String root,
int level)
Constructs a daugther node. |
|
| Method Summary | |
|---|---|
String |
getValue()
Cast a String to the appropriate type of a Number or Boolean instance. |
protected boolean |
isVariable(String arg)
Test if the argument is a variable or a constant double. |
| Methods inherited from class vec_math.StringNode |
|---|
getVariables, parseOperator, parseSub, replaceVariable, replaceVariable, setValidOperator |
| Methods inherited from class vec_math.Node |
|---|
equals, getLevel, getParent, getParseSource, getSub, getSubAt, getSubNodeNumber, getTie, isFinal, isParsed, isRoot, parse, parse, setParse, setParseSource, setSub, setTie, setValue, toString, traceVariable |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ExpressionNode(String root)
public ExpressionNode(StringNode parent,
String root,
int level)
| Method Detail |
|---|
protected boolean isVariable(String arg)
The argument must be of type String. This string is then tested in the following ways:
isVariable in class StringNodepublic String getValue()
getValue in class Node<String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||