vec_math
Class BooleanNode

java.lang.Object
  extended by vec_math.Node<String>
      extended by vec_math.StringNode
          extended by vec_math.BooleanNode
All Implemented Interfaces:
Serializable

public class BooleanNode
extends StringNode

A helper class taylored for using boolean variables.

See Also:
Serialized Form

Constructor Summary
BooleanNode(String root)
          Constructs a new top-level boolean node.
BooleanNode(StringNode parent, String root, int level)
          Constructs a daugther node.
 
Method Summary
protected  boolean isVariable(String arg)
          Test if the argument is a variable or a constant in the boolean context.
 
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, getValue, 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

BooleanNode

public BooleanNode(String root)
Constructs a new top-level boolean node. Parsing a string expression will always start with a call to this constructor, therefore the valid operators are also set here.


BooleanNode

public BooleanNode(StringNode parent,
                   String root,
                   int level)
Constructs a daugther node. This constructor is called repeatedly during parsing.

Method Detail

isVariable

protected boolean isVariable(String arg)
Test if the argument is a variable or a constant in the boolean context.

Overrides:
isVariable in class StringNode