public class AVLTree<K,V> extends BinarySearchTree<K,V> implements Dictionary<K,V>
Constructor and Description |
---|
AVLTree() |
AVLTree(java.util.Comparator<K> c) |
Modifier and Type | Method and Description |
---|---|
Entry<K,V> |
insert(K k,
V v)
Inserts an item into the dictionary and returns the newly created
entry.
|
Entry<K,V> |
remove(Entry<K,V> ent)
Removes and returns an 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 AVLTree()
public AVLTree(java.util.Comparator<K> c)
public Entry<K,V> insert(K k, V v) 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