Interface ITreeNode
-
- All Implemented Interfaces:
-
java.io.Serializable
public interface ITreeNode<T> implements Serializable
Represents an interface for node of the Tree class.
-
-
Method Summary
Modifier and Type Method Description abstract T
getData()
abstract ITreeNode<out Object>
getLeftChild()
abstract int
getNumberOfChildren()
abstract ITreeNode<out Object>
getRightChild()
abstract Type
getType()
abstract T
getValue(Map<HashString, ITreeNode<out Object>> mp)
abstract HashString
toHashString()
Similar to toString(), but returns a HashString. abstract String
toString()
-
-
Method Detail
-
getLeftChild
abstract ITreeNode<out Object> getLeftChild()
- Returns:
the left child (if any)
-
getNumberOfChildren
abstract int getNumberOfChildren()
- Returns:
the number of first level children.
-
getRightChild
abstract ITreeNode<out Object> getRightChild()
- Returns:
the righr child (if any)
-
getValue
abstract T getValue(Map<HashString, ITreeNode<out Object>> mp)
- Parameters:
mp
- the matches map.- Returns:
the value of the Node. (Double if it's a Num or a Var of type Num, String if it's a Const or a Var of type Const) the method return null if there are some variable not yet allocated in the expression.
-
toHashString
abstract HashString toHashString()
Similar to toString(), but returns a HashString.
- Returns:
a HashString representation of this Object
-
-
-
-