|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fusesource.hawtdb.util.TreeMap<K,V>
public class TreeMap<K,V>
A TreeMap that is lighter weight than the Sun implementation with implementations for upper/lower/floor/ceiling accessors.
Nested Class Summary | |
---|---|
static class |
TreeMap.TreeEntry<K,V>
|
Constructor Summary | |
---|---|
TreeMap()
|
|
TreeMap(java.util.Comparator<? super K> comparator)
|
Method Summary | |
---|---|
TreeMap.TreeEntry<K,V> |
ceilingEntry(K key)
Returns a key-value mapping associated with the least key greater than or equal to the given key, or null if there is no such key. |
void |
clear()
Clears all elements in this map. |
java.util.Comparator<? super K> |
comparator()
|
boolean |
containsKey(K key)
|
boolean |
containsValue(java.lang.Object value)
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
|
TreeMap.TreeEntry<K,V> |
firstEntry()
Returns a key-value mapping associated with the least key in this map, or null if the map is empty. |
K |
firstKey()
|
TreeMap.TreeEntry<K,V> |
floorEntry(K key)
Returns a key-value mapping associated with the greatest key less than or equal to the given key, or null if there is no such key. |
V |
get(K key)
|
TreeMap.TreeEntry<K,V> |
getEntry(K key)
|
boolean |
isEmpty()
|
java.util.Set<K> |
keySet()
|
TreeMap.TreeEntry<K,V> |
lastEntry()
Returns a key-value mapping associated with the greatest key in this map, or null if the map is empty. |
K |
lastKey()
|
TreeMap.TreeEntry<K,V> |
lowerEntry(K key)
Returns a key-value mapping associated with the greatest key strictly less than the given key, or null if there is no such key |
V |
put(K key,
V value)
|
void |
putAll(java.util.Map<? extends K,? extends V> t)
|
V |
remove(K key)
|
V |
removeEntry(TreeMap.TreeEntry<K,V> n)
complicated red-black delete stuff. |
int |
size()
|
TreeMap.TreeEntry<K,V> |
upperEntry(K key)
Returns a key-value mapping associated with the lowest key strictly greater than the given key, or null if there is no such key |
java.util.Collection<V> |
values()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeMap()
public TreeMap(java.util.Comparator<? super K> comparator)
Method Detail |
---|
public java.util.Comparator<? super K> comparator()
public K firstKey()
public K lastKey()
public void clear()
public boolean containsKey(K key)
public boolean containsValue(java.lang.Object value)
public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
public V get(K key)
public final TreeMap.TreeEntry<K,V> getEntry(K key)
public TreeMap.TreeEntry<K,V> firstEntry()
public TreeMap.TreeEntry<K,V> lastEntry()
public TreeMap.TreeEntry<K,V> lowerEntry(K key)
key
- the key.
public TreeMap.TreeEntry<K,V> floorEntry(K key)
key
- The key for which to search.
public TreeMap.TreeEntry<K,V> upperEntry(K key)
key
- The key
public TreeMap.TreeEntry<K,V> ceilingEntry(K key)
key
-
public boolean isEmpty()
public java.util.Set<K> keySet()
public void putAll(java.util.Map<? extends K,? extends V> t)
public V remove(K key)
public V put(K key, V value)
public final V removeEntry(TreeMap.TreeEntry<K,V> n)
n
- the node to be deletedpublic int size()
public java.util.Collection<V> values()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |