public class RBTree<K,V> extends BinarySearchTree<K,V> implements Dictionary<K,V>
Constructor and Description |
---|
RBTree() |
RBTree(java.util.Comparator<K> C) |
Modifier and Type | Method and Description |
---|---|
Entry<K,V> |
insert(K k,
V x)
Inserts an item into the dictionary and returns the newly
created entry.
|
Entry<K,V> |
remove(Entry<K,V> ent)
Removes and returns the given entry from the dictionary.
|
entries, find, findAll, isEmpty, size
addRoot, attach, children, expandExternal, hasLeft, hasRight, insertLeft, insertRight, isExternal, isInternal, isRoot, iterator, left, parent, positions, remove, removeAboveExternal, replace, right, root, sibling, swapElements
public RBTree()
public RBTree(java.util.Comparator<K> C)
public Entry<K,V> insert(K k, V x) throws InvalidKeyException
insert
in interface Dictionary<K,V>
insert
in class BinarySearchTree<K,V>
InvalidKeyException
public Entry<K,V> remove(Entry<K,V> ent) throws InvalidEntryException
remove
in interface Dictionary<K,V>
remove
in class BinarySearchTree<K,V>
InvalidEntryException