Class TreeNode
- java.lang.Object
-
- one.empty3.library.core.raytracer.tree.TreeNode
-
- Direct Known Subclasses:
EquationSystem
,EquationTreeNode
,TreeNodeDouble
,TreeNodeValue
,TreeNodeVariable
,TreeTreeNode
public class TreeNode extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]
objects
protected TreeNodeType
type
-
Constructor Summary
Constructors Constructor Description TreeNode(java.lang.String expStr)
TreeNode(TreeNode src, java.lang.Object[] objects, TreeNodeType clazz)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
eval()
java.util.ArrayList<TreeNode>
getChildren()
java.lang.String
getExpressionString()
TreeNode
getParent()
TreeNodeType
getType()
java.lang.Object
getValue()
void
setChildren(java.util.ArrayList<TreeNode> children)
void
setExpressionString(java.lang.String expressionString)
void
setParent(TreeNode parent)
void
setValue(TreeNodeValue value)
java.lang.String
toString()
-
-
-
Field Detail
-
objects
protected java.lang.Object[] objects
-
type
protected TreeNodeType type
-
-
Constructor Detail
-
TreeNode
public TreeNode(java.lang.String expStr)
-
TreeNode
public TreeNode(TreeNode src, java.lang.Object[] objects, TreeNodeType clazz)
-
-
Method Detail
-
getValue
public java.lang.Object getValue()
-
setValue
public void setValue(TreeNodeValue value)
-
eval
public java.lang.Double eval() throws TreeNodeEvalException, AlgebraicFormulaSyntaxException
-
getChildren
public java.util.ArrayList<TreeNode> getChildren()
-
setChildren
public void setChildren(java.util.ArrayList<TreeNode> children)
-
getParent
public TreeNode getParent()
-
setParent
public void setParent(TreeNode parent)
-
getExpressionString
public java.lang.String getExpressionString()
-
setExpressionString
public void setExpressionString(java.lang.String expressionString)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getType
public TreeNodeType getType()
-
-