K - type of keys, must be comparableV - type of valuespublic class SkipList<K extends Comparable<? super K>,V> extends Object implements Flushable, Iterable<V>
| Modifier and Type | Field and Description |
|---|---|
protected SkipSpan<K,V> |
first |
protected static int |
P
the probability of each next higher level
|
static Random |
rng |
protected int |
size |
protected SkipLevels<K,V> |
stack |
| Modifier | Constructor and Description |
|---|---|
protected |
SkipList() |
|
SkipList(int span) |
| Modifier and Type | Method and Description |
|---|---|
void |
addItem() |
void |
balance() |
void |
delItem() |
SkipIterator<K,V> |
find(K key) |
void |
flush() |
int |
generateColHeight() |
V |
get(K key) |
SkipIterator<K,V> |
iterator() |
int |
maxLevels() |
void |
put(K key,
V val) |
V |
remove(K key) |
int |
size() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorprotected SkipSpan<K extends Comparable<? super K>,V> first
protected static final int P
public static final Random rng
protected int size
protected SkipLevels<K extends Comparable<? super K>,V> stack
public void addItem()
public void balance()
public void delItem()
public SkipIterator<K,V> find(K key)
public int generateColHeight()
public int maxLevels()
public int size()