Package EnchantmentOrder
Class Node
java.lang.Object
kkchengaf.EnchantmentOrder.Node
The Node Class that maintains the optimal combining structure,
left, right: the items in anvil to be combined,
value: object of NodeValue that stores the information of a tree node
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Node
Tree Node Constructor- Parameters:
l
- , Node, left childr
- , Node, right childv
- , NodeValue, the data
-
-
Method Details
-
getLeft
get the left child- Returns:
- Node
-
getRight
get the right child- Returns:
- Node
-
getValue
get the data of this node- Returns:
- NodeValue
-
setValue
set the data of this node- Parameters:
value
- , NodeValue
-
isItem
public boolean isItem()check whether this node's data is an item- Returns:
- boolean
-
toString
to String, return "" if data is unset
-