Class UnmodifiableSortedMap
- java.lang.Object
-
- org.apache.commons.collections.map.AbstractMapDecorator
-
- org.apache.commons.collections.map.AbstractSortedMapDecorator
-
- org.apache.commons.collections.map.UnmodifiableSortedMap
-
- All Implemented Interfaces:
Serializable
,Map
,SortedMap
,Unmodifiable
@Deprecated(since="2021-04-30") public final class UnmodifiableSortedMap extends AbstractSortedMapDecorator implements Unmodifiable, Serializable
Deprecated.Commons Collections 3 is in maintenance mode. Commons Collections 4 should be used instead.Decorates anotherSortedMap
to ensure it can't be altered.This class is Serializable from Commons Collections 3.1.
- Since:
- Commons Collections 3.0
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
clear()
Deprecated.Comparator
comparator()
Deprecated.static SortedMap
decorate(SortedMap map)
Deprecated.Factory method to create an unmodifiable sorted map.Set
entrySet()
Deprecated.Object
firstKey()
Deprecated.SortedMap
headMap(Object toKey)
Deprecated.Set
keySet()
Deprecated.Object
lastKey()
Deprecated.Object
put(Object key, Object value)
Deprecated.void
putAll(Map mapToCopy)
Deprecated.Object
remove(Object key)
Deprecated.SortedMap
subMap(Object fromKey, Object toKey)
Deprecated.SortedMap
tailMap(Object fromKey)
Deprecated.Collection
values()
Deprecated.-
Methods inherited from class org.apache.commons.collections.map.AbstractMapDecorator
containsKey, containsValue, equals, get, hashCode, isEmpty, size, toString
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove, replace, replace, replaceAll, size
-
-
-
-
Method Detail
-
decorate
public static SortedMap decorate(SortedMap map)
Deprecated.Factory method to create an unmodifiable sorted map.- Parameters:
map
- the map to decorate, must not be null- Throws:
IllegalArgumentException
- if map is null
-
clear
public void clear()
Deprecated.- Specified by:
clear
in interfaceMap
- Overrides:
clear
in classAbstractMapDecorator
-
put
public Object put(Object key, Object value)
Deprecated.- Specified by:
put
in interfaceMap
- Overrides:
put
in classAbstractMapDecorator
-
putAll
public void putAll(Map mapToCopy)
Deprecated.- Specified by:
putAll
in interfaceMap
- Overrides:
putAll
in classAbstractMapDecorator
-
remove
public Object remove(Object key)
Deprecated.- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classAbstractMapDecorator
-
entrySet
public Set entrySet()
Deprecated.
-
keySet
public Set keySet()
Deprecated.
-
values
public Collection values()
Deprecated.
-
firstKey
public Object firstKey()
Deprecated.- Specified by:
firstKey
in interfaceSortedMap
- Overrides:
firstKey
in classAbstractSortedMapDecorator
-
lastKey
public Object lastKey()
Deprecated.- Specified by:
lastKey
in interfaceSortedMap
- Overrides:
lastKey
in classAbstractSortedMapDecorator
-
comparator
public Comparator comparator()
Deprecated.- Specified by:
comparator
in interfaceSortedMap
- Overrides:
comparator
in classAbstractSortedMapDecorator
-
subMap
public SortedMap subMap(Object fromKey, Object toKey)
Deprecated.- Specified by:
subMap
in interfaceSortedMap
- Overrides:
subMap
in classAbstractSortedMapDecorator
-
headMap
public SortedMap headMap(Object toKey)
Deprecated.- Specified by:
headMap
in interfaceSortedMap
- Overrides:
headMap
in classAbstractSortedMapDecorator
-
-