Package | Description |
---|---|
tree |
Modifier and Type | Class and Description |
---|---|
class |
EmptyTree<K extends java.lang.Comparable<K>,V>
This class is used to represent the empty search tree: a search tree that
contains no entries.
|
class |
NonEmptyTree<K extends java.lang.Comparable<K>,V>
This class represents a non-empty search tree.
|
Modifier and Type | Method and Description |
---|---|
Tree<K,V> |
Tree.delete(K key)
Delete any binding the key has in this tree.
|
Tree<K,V> |
NonEmptyTree.delete(K key) |
Tree<K,V> |
EmptyTree.delete(K key) |
Tree<K,V> |
Tree.subTree(K fromKey,
K toKey)
Returns a Tree containing all entries between fromKey and toKey, inclusive.
|
Tree<K,V> |
NonEmptyTree.subTree(K fromKey,
K toKey) |
Tree<K,V> |
EmptyTree.subTree(K fromKey,
K toKey) |
Constructor and Description |
---|
NonEmptyTree(K key,
V value,
Tree<K,V> left,
Tree<K,V> right)
Only constructor we need.
|
NonEmptyTree(K key,
V value,
Tree<K,V> left,
Tree<K,V> right)
Only constructor we need.
|