org.jacorb.idl

Class ConstExprEvaluator.Node

Enclosing Class:
ConstExprEvaluator

protected class ConstExprEvaluator.Node
extends java.lang.Object

Field Summary

ConstExprEvaluator.Node
nLeft
int
nLevel
ConstExprEvaluator.Operator
nOperator
ConstExprEvaluator.Node
nParent
ConstExprEvaluator.Node
nRight
String
nString
Double
nValue

Constructor Summary

Node(String s)
Node(ConstExprEvaluator.Node parent, String s, int level)

Method Summary

protected String
addZero(String s)
returns a string that doesnt start with a + or a -
protected int
checkBrackets(String s)
checks if there is any missing brackets
protected ConstExprEvaluator.Node
getLeft()
protected int
getLevel()
protected ConstExprEvaluator.Operator
getOperator()
protected ConstExprEvaluator.Node
getRight()
protected String
getString()
protected Double
getValue()
protected boolean
hasChild()
protected boolean
hasLeft()
protected boolean
hasOperator()
protected boolean
hasRight()
String
removeBrackets(String s)
Removes spaces, tabs and brackets at the begining
String
removeIllegalCharacters(String s)
Removes illegal characters
protected void
setValue(Double f)

Field Details

nLeft

public ConstExprEvaluator.Node nLeft


nLevel

public int nLevel


nOperator

public ConstExprEvaluator.Operator nOperator


nParent

public ConstExprEvaluator.Node nParent


nRight

public ConstExprEvaluator.Node nRight


nString

public String nString


nValue

public Double nValue

Constructor Details

Node

public Node(String s)
            throws Exception


Node

public Node(ConstExprEvaluator.Node parent,
            String s,
            int level)
            throws Exception

Method Details

addZero

protected String addZero(String s)
returns a string that doesnt start with a + or a -


checkBrackets

protected int checkBrackets(String s)
checks if there is any missing brackets

Returns:
true if s is valid


getLeft

protected ConstExprEvaluator.Node getLeft()


getLevel

protected int getLevel()


getOperator

protected ConstExprEvaluator.Operator getOperator()


getRight

protected ConstExprEvaluator.Node getRight()


getString

protected String getString()


getValue

protected Double getValue()


hasChild

protected boolean hasChild()


hasLeft

protected boolean hasLeft()


hasOperator

protected boolean hasOperator()


hasRight

protected boolean hasRight()


removeBrackets

public String removeBrackets(String s)
Removes spaces, tabs and brackets at the begining


removeIllegalCharacters

public String removeIllegalCharacters(String s)
Removes illegal characters


setValue

protected void setValue(Double f)