|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.TreeMap.SubMap<K,V>
static final class TreeMap.SubMap<K,V>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Field Summary | |
|---|---|
(package private) K |
endKey
|
(package private) Set<Map.Entry<K,V>> |
entrySet
|
(package private) boolean |
hasEnd
|
(package private) boolean |
hasStart
|
(package private) K |
startKey
|
| Fields inherited from class java.util.AbstractMap |
|---|
keySet, valuesCollection |
| Constructor Summary | |
|---|---|
TreeMap.SubMap(K start,
TreeMap<K,V> map)
|
|
TreeMap.SubMap(K start,
TreeMap<K,V> map,
K end)
|
|
TreeMap.SubMap(TreeMap<K,V> map,
K end)
|
|
| Method Summary | |
|---|---|
Comparator<? super K> |
comparator()
Returns the Comparator used to compare elements in this SortedMap. |
boolean |
containsKey(Object key)
Searches this Map for the specified key. |
Set<Map.Entry<K,V>> |
entrySet()
Returns a set view of the mappings contained in this map. |
(package private) TreeMap.Entry<K,V> |
firstEntry()
|
K |
firstKey()
Answer the first sorted key in this SortedMap. |
V |
get(Object key)
Returns the value of the mapping with the specified key. |
SortedMap<K,V> |
headMap(K endKey)
Returns a SortedMap of the specified portion of this
SortedMap which contains keys less than the end key. |
boolean |
isEmpty()
Returns if this Map has no elements, a size of zero. |
Set<K> |
keySet()
Returns a Set of the keys contained in this Map. |
K |
lastKey()
Returns the last sorted key in this SortedMap. |
V |
put(K key,
V value)
Maps the specified key to the specified value. |
V |
remove(Object key)
Removes a mapping with the specified key from this Map. |
SortedMap<K,V> |
subMap(K startKey,
K endKey)
Returns a SortedMap of the specified portion of this SortedMap which contains keys greater or equal to the start key but less than the end key. |
SortedMap<K,V> |
tailMap(K startKey)
Returns a SortedMap of the specified portion of this SortedMap which contains keys greater or equal to the start key. |
Collection<V> |
values()
Returns a collection of the values contained in this map. |
| Methods inherited from class java.util.AbstractMap |
|---|
clear, clone, containsValue, equals, hashCode, putAll, size, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
clear, containsValue, equals, hashCode, putAll, size |
| Field Detail |
|---|
boolean hasStart
boolean hasEnd
K startKey
K endKey
transient Set<Map.Entry<K,V>> entrySet
| Constructor Detail |
|---|
TreeMap.SubMap(K start,
TreeMap<K,V> map)
TreeMap.SubMap(K start,
TreeMap<K,V> map,
K end)
TreeMap.SubMap(TreeMap<K,V> map,
K end)
| Method Detail |
|---|
public Comparator<? super K> comparator()
SortedMap
comparator in interface SortedMap<K,V>public boolean containsKey(Object key)
AbstractMap
containsKey in interface Map<K,V>containsKey in class AbstractMap<K,V>key - the object to search for
key is a key of this Map, false otherwisepublic Set<Map.Entry<K,V>> entrySet()
AbstractMap
entrySet in interface Map<K,V>entrySet in class AbstractMap<K,V>public K firstKey()
SortedMap
firstKey in interface SortedMap<K,V>TreeMap.Entry<K,V> firstEntry()
public V get(Object key)
AbstractMap
get in interface Map<K,V>get in class AbstractMap<K,V>key - the key
public SortedMap<K,V> headMap(K endKey)
SortedMapSortedMap of the specified portion of this
SortedMap which contains keys less than the end key. Users
should be aware that the return value is actually backed by this
SortedMap. Hence any modifications made to one will be
immediately visible to the other.
headMap in interface SortedMap<K,V>endKey - the end key
endKeypublic boolean isEmpty()
AbstractMap
isEmpty in interface Map<K,V>isEmpty in class AbstractMap<K,V>AbstractMap.size()public Set<K> keySet()
AbstractMap
keySet in interface Map<K,V>keySet in class AbstractMap<K,V>public K lastKey()
SortedMap
lastKey in interface SortedMap<K,V>
public V put(K key,
V value)
AbstractMap
put in interface Map<K,V>put in class AbstractMap<K,V>key - the keyvalue - the value
public V remove(Object key)
AbstractMap
remove in interface Map<K,V>remove in class AbstractMap<K,V>key - the key of the mapping to remove
public SortedMap<K,V> subMap(K startKey,
K endKey)
SortedMapSortedMap. Hence any modifications made to one will
be immediately visible to the other.
subMap in interface SortedMap<K,V>startKey - the start keyendKey - the end key
startKey and less than endKeypublic SortedMap<K,V> tailMap(K startKey)
SortedMap
tailMap in interface SortedMap<K,V>startKey - the start key
startKeypublic Collection<V> values()
AbstractMap
values in interface Map<K,V>values in class AbstractMap<K,V>
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||