|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.collections4.map.AbstractIterableMap<K,V>
org.apache.commons.collections4.map.AbstractMapDecorator<K,V>
org.apache.commons.collections4.map.AbstractSortedMapDecorator<K,V>
org.apache.commons.collections4.map.UnmodifiableSortedMap<K,V>
public final class UnmodifiableSortedMap<K,V>
Decorates another SortedMap to ensure it can't be altered.
This class is Serializable from Commons Collections 3.1.
Attempts to modify it will result in an UnsupportedOperationException.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.commons.collections4.map.AbstractSortedMapDecorator |
|---|
AbstractSortedMapDecorator.SortedMapIterator<K,V> |
| Method Summary | ||
|---|---|---|
void |
clear()
|
|
Comparator<? super K> |
comparator()
|
|
Set<Map.Entry<K,V>> |
entrySet()
|
|
K |
firstKey()
Gets the first key currently in this map. |
|
SortedMap<K,V> |
headMap(K toKey)
|
|
Set<K> |
keySet()
|
|
K |
lastKey()
Gets the last key currently in this map. |
|
V |
put(K key,
V value)
Note that the return type is Object, rather than V as in the Map interface. |
|
void |
putAll(Map<? extends K,? extends V> mapToCopy)
|
|
V |
remove(Object key)
|
|
SortedMap<K,V> |
subMap(K fromKey,
K toKey)
|
|
SortedMap<K,V> |
tailMap(K fromKey)
|
|
static
|
unmodifiableSortedMap(SortedMap<K,V> map)
Factory method to create an unmodifiable sorted map. |
|
Collection<V> |
values()
|
|
| Methods inherited from class org.apache.commons.collections4.map.AbstractSortedMapDecorator |
|---|
decorated, mapIterator, nextKey, previousKey |
| Methods inherited from class org.apache.commons.collections4.map.AbstractMapDecorator |
|---|
containsKey, containsValue, equals, get, hashCode, isEmpty, size, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.commons.collections4.Get |
|---|
containsKey, containsValue, get, isEmpty, size |
| Method Detail |
|---|
public static <K,V> SortedMap<K,V> unmodifiableSortedMap(SortedMap<K,V> map)
K - the key typeV - the value typemap - the map to decorate, must not be null
IllegalArgumentException - if map is nullpublic void clear()
clear in interface Map<K,V>clear in interface Put<K,V>clear in class AbstractMapDecorator<K,V>Map.clear()
public V put(K key,
V value)
Put
put in interface Map<K,V>put in interface Put<K,V>put in class AbstractMapDecorator<K,V>Map.put(Object, Object)public void putAll(Map<? extends K,? extends V> mapToCopy)
putAll in interface Map<K,V>putAll in interface Put<K,V>putAll in class AbstractMapDecorator<K,V>Map.putAll(Map)public V remove(Object key)
remove in interface Map<K,V>remove in interface Get<K,V>remove in class AbstractMapDecorator<K,V>Map.remove(Object)public Set<Map.Entry<K,V>> entrySet()
entrySet in interface Map<K,V>entrySet in interface Get<K,V>entrySet in class AbstractMapDecorator<K,V>Map.entrySet()public Set<K> keySet()
keySet in interface Map<K,V>keySet in interface Get<K,V>keySet in class AbstractMapDecorator<K,V>Map.keySet()public Collection<V> values()
values in interface Map<K,V>values in interface Get<K,V>values in class AbstractMapDecorator<K,V>Map.values()public K firstKey()
OrderedMap
firstKey in interface SortedMap<K,V>firstKey in interface OrderedMap<K,V>firstKey in class AbstractSortedMapDecorator<K,V>public K lastKey()
OrderedMap
lastKey in interface SortedMap<K,V>lastKey in interface OrderedMap<K,V>lastKey in class AbstractSortedMapDecorator<K,V>public Comparator<? super K> comparator()
comparator in interface SortedMap<K,V>comparator in class AbstractSortedMapDecorator<K,V>
public SortedMap<K,V> subMap(K fromKey,
K toKey)
subMap in interface SortedMap<K,V>subMap in class AbstractSortedMapDecorator<K,V>public SortedMap<K,V> headMap(K toKey)
headMap in interface SortedMap<K,V>headMap in class AbstractSortedMapDecorator<K,V>public SortedMap<K,V> tailMap(K fromKey)
tailMap in interface SortedMap<K,V>tailMap in class AbstractSortedMapDecorator<K,V>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||