Package com.graphbuilder.math
Class TermNode
java.lang.Object
com.graphbuilder.math.Expression
com.graphbuilder.math.TermNode
A node of an expression tree that represents a variable or a function.
-
Field Summary
FieldsFields inherited from class com.graphbuilder.math.Expression
parent -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.graphbuilder.math.Expression
checkBeforeAccept, eval, getFunctionNames, getParent, getVariableNames, isDescendent, toString
-
Field Details
-
name
-
negate
protected boolean negate
-
-
Constructor Details
-
TermNode
-
-
Method Details
-
getNegate
public boolean getNegate()Returns true if the term should negate the result before returning it in the eval method. -
setNegate
public void setNegate(boolean b) -
getName
Returns the name of the term. -
setName
Sets the name of the term. Valid names must not begin with a digit or a decimal, and must not contain round brackets, operators, commas or whitespace.- Throws:
IllegalArgumentException- If the name is null or invalid.
-