|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDictionary<K,D>
Searchtree<K,D>
Splaytree<K,D>
K
- The type of the keys.D
- The type of the data.public class Splaytree<K extends java.lang.Comparable<K>,D>
An implementation of a Splaytree.
Constructor Summary | |
---|---|
Splaytree()
|
Method Summary | |
---|---|
void |
delete(K k)
Removes the entry which stores the data for the key k. |
D |
find(K k)
Looks up the data for the given key k. |
void |
insert(K k,
D d)
Associates the data d to the key k in this map. |
boolean |
iselement(K k)
Checks whether the given key k is present in this searchtree. |
Methods inherited from class Searchtree |
---|
iterator, opt_searchtree, print, size |
Methods inherited from class Dictionary |
---|
array, isempty, simpleiterator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Splaytree()
Method Detail |
---|
public void insert(K k, D d)
Map
insert
in interface Map<K extends java.lang.Comparable<K>,D>
insert
in class Searchtree<K extends java.lang.Comparable<K>,D>
k
- The key to store.d
- The data associated to the key k.public boolean iselement(K k)
Searchtree
iselement
in interface Map<K extends java.lang.Comparable<K>,D>
iselement
in class Searchtree<K extends java.lang.Comparable<K>,D>
k
- The key to look for, must be non-null.
public D find(K k)
Searchtree
find
in interface Map<K extends java.lang.Comparable<K>,D>
find
in class Searchtree<K extends java.lang.Comparable<K>,D>
k
- The key to look for, must be non-null.
Map.find(Object)
public void delete(K k)
Searchtree
delete
in interface Map<K extends java.lang.Comparable<K>,D>
delete
in class Searchtree<K extends java.lang.Comparable<K>,D>
k
- The key to delete with its associated data.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |