# ConcurrentSkipListMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#pubctors)\|[Methods](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#inhmethods)  

# ConcurrentSkipListMap

`
public


class
ConcurrentSkipListMap
`  
`


``

extends `[AbstractMap](https://developer.android.com/reference/java/util/AbstractMap)`<K, V>


``


implements

`[Cloneable](https://developer.android.com/reference/java/lang/Cloneable)`,

`[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>,

`[Serializable](https://developer.android.com/reference/java/io/Serializable)`


`

|---|---|----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [java.util.AbstractMap](https://developer.android.com/reference/java/util/AbstractMap)\<K, V\> ||
|   | ↳ | java.util.concurrent.ConcurrentSkipListMap\<K, V\> |

<br />

*** ** * ** ***

A scalable concurrent[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)implementation. The map is sorted according to the[ordering](https://developer.android.com/reference/java/lang/Comparable)of its keys, or by a[Comparator](https://developer.android.com/reference/java/util/Comparator)provided at map creation time, depending on which constructor is used.

This class implements a concurrent variant of[SkipLists](http://en.wikipedia.org/wiki/Skip_list)providing expected average*log(n)* time cost for the`containsKey`,`get`,`put`and`remove`operations and their variants. Insertion, removal, update, and access operations safely execute concurrently by multiple threads.

Iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

Ascending key ordered views and their iterators are faster than descending ones.

All`Map.Entry`pairs returned by methods in this class and its views represent snapshots of mappings at the time they were produced. They do*not* support the`Entry.setValue`method. (Note however that it is possible to change mappings in the associated map using`put`,`putIfAbsent`, or`replace`, depending on exactly which effect you need.)

Beware that bulk operations`putAll`,`equals`,`toArray`,`containsValue`, and`clear`are*not* guaranteed to be performed atomically. For example, an iterator operating concurrently with a`putAll`operation might view only some of the added elements.

This class and its views and iterators implement all of the*optional* methods of the[Map](https://developer.android.com/reference/java/util/Map)and[Iterator](https://developer.android.com/reference/java/util/Iterator)interfaces. Like most other concurrent collections, this class does*not* permit the use of`null`keys or values because some null return values cannot be reliably distinguished from the absence of elements.

This class is a member of the[Java Collections Framework](https://reference/java/util/package-summary.html#CollectionsFramework).

## Summary

|                                                                                                                                                                                                                            ### Public constructors                                                                                                                                                                                                                             ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ConcurrentSkipListMap())`() ` Constructs a new, empty map, sorted according to the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of the keys.                                                                                                                                                                                |
| ` `[ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ConcurrentSkipListMap(java.util.Comparator<?%20super%20K>))`(`[Comparator](https://developer.android.com/reference/java/util/Comparator)`<? super K> comparator) ` Constructs a new, empty map, sorted according to the specified comparator.                                                                                                                 |
| ` `[ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ConcurrentSkipListMap(java.util.Map<?%20extends%20K,?%20extends%20V>))`(`[Map](https://developer.android.com/reference/java/util/Map)`<? extends K, ? extends V> m) ` Constructs a new map containing the same mappings as the given map, sorted according to the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of the keys. |
| ` `[ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ConcurrentSkipListMap(java.util.SortedMap<K,?%20extends%20V>))`(`[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, ? extends V> m) ` Constructs a new map containing the same mappings and using the same ordering as the specified sorted map.                                                                                    |

|                                                                                                                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                                                                                                                   ||
|-------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[ceilingEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ceilingEntry(K))`(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 entry.                                                                                                                                                                                                                                 |
| ` K`                                                                                                                                            | ` `[ceilingKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#ceilingKey(K))`(K key) ` Returns the least key greater than or equal to the given key, or`null`if there is no such key.                                                                                                                                                                                                                                                                           |
| ` void`                                                                                                                                         | ` `[clear](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#clear())`() ` Removes all of the mappings from this map.                                                                                                                                                                                                                                                                                                                                               |
| ` `[ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap)`<K, V>`                          | ` `[clone](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#clone())`() ` Returns a shallow copy of this`ConcurrentSkipListMap`instance.                                                                                                                                                                                                                                                                                                                           |
| ` `[Comparator](https://developer.android.com/reference/java/util/Comparator)`<? super K>`                                                      | ` `[comparator](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#comparator())`() ` Returns the comparator used to order the keys in this map, or`null`if this map uses the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of its keys.                                                                                                                                                                                            |
| ` V`                                                                                                                                            | ` `[compute](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#compute(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` Attempts to compute a mapping for the specified key and its current mapped value (or`null`if there is no current mapping).                           |
| ` V`                                                                                                                                            | ` `[computeIfAbsent](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#computeIfAbsent(K,%20java.util.function.Function<?%20super%20K,?%20extends%20V>))`(K key, `[Function](https://developer.android.com/reference/java/util/function/Function)`<? super K, ? extends V> mappingFunction) ` If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless`null`. |
| ` V`                                                                                                                                            | ` `[computeIfPresent](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#computeIfPresent(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value.       |
| ` boolean`                                                                                                                                      | ` `[containsKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#containsKey(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns`true`if this map contains a mapping for the specified key.                                                                                                                                                                                                                   |
| ` boolean`                                                                                                                                      | ` `[containsValue](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#containsValue(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Returns`true`if this map maps one or more keys to the specified value.                                                                                                                                                                                                         |
| ` `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                                          | ` `[descendingKeySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#descendingKeySet())`() ` Returns a reverse order[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                                                                                                                                                                                       |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[descendingMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#descendingMap())`() ` Returns a reverse order view of the mappings contained in this map.                                                                                                                                                                                                                                                                                                      |
| ` `[Set](https://developer.android.com/reference/java/util/Set)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | ` `[entrySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#entrySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the mappings contained in this map.                                                                                                                                                                                                                                                                   |
| ` boolean`                                                                                                                                      | ` `[equals](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Compares the specified object with this map for equality.                                                                                                                                                                                                                                        |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[firstEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#firstEntry())`() ` Returns a key-value mapping associated with the least key in this map, or`null`if the map is empty.                                                                                                                                                                                                                                                                            |
| ` K`                                                                                                                                            | ` `[firstKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#firstKey())`() ` Returns the first (lowest) key currently in this map.                                                                                                                                                                                                                                                                                                                              |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[floorEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#floorEntry(K))`(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.                                                                                                                                                                                                                                       |
| ` K`                                                                                                                                            | ` `[floorKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#floorKey(K))`(K key) ` Returns the greatest key less than or equal to the given key, or`null`if there is no such key.                                                                                                                                                                                                                                                                               |
| ` void`                                                                                                                                         | ` `[forEach](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#forEach(java.util.function.BiConsumer<?%20super%20K,?%20super%20V>))`(`[BiConsumer](https://developer.android.com/reference/java/util/function/BiConsumer)`<? super K, ? super V> action) ` Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.                                                                            |
| ` V`                                                                                                                                            | ` `[get](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#get(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns the value to which the specified key is mapped, or`null`if this map contains no mapping for the key.                                                                                                                                                                                         |
| ` V`                                                                                                                                            | ` `[getOrDefault](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#getOrDefault(java.lang.Object,%20V))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, V defaultValue) ` Returns the value to which the specified key is mapped, or the given defaultValue if this map contains no mapping for the key.                                                                                                                                |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[headMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#headMap(K))`(K toKey) ` Returns a view of the portion of this map whose keys are strictly less than`toKey`. Equivalent to`headMap(toKey, false)`.                                                                                                                                                                                                                                                    |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[headMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#headMap(K,%20boolean))`(K toKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are less than (or equal to, if`inclusive`is true)`toKey`.                                                                                                                                                                                                                                 |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[higherEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#higherEntry(K))`(K key) ` Returns a key-value mapping associated with the least key strictly greater than the given key, or`null`if there is no such key.                                                                                                                                                                                                                                        |
| ` K`                                                                                                                                            | ` `[higherKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#higherKey(K))`(K key) ` Returns the least key strictly greater than the given key, or`null`if there is no such key.                                                                                                                                                                                                                                                                                |
| ` boolean`                                                                                                                                      | ` `[isEmpty](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#isEmpty())`() ` Returns`true`if this map contains no key-value mappings.                                                                                                                                                                                                                                                                                                                             |
| ` `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                                          | ` `[keySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#keySet())`() ` Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                                                                                                                                                                                                                         |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[lastEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#lastEntry())`() ` Returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty.                                                                                                                                                                                                                                                                           |
| ` K`                                                                                                                                            | ` `[lastKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#lastKey())`() ` Returns the last (highest) key currently in this map.                                                                                                                                                                                                                                                                                                                                |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[lowerEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#lowerEntry(K))`(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.                                                                                                                                                                                                                                          |
| ` K`                                                                                                                                            | ` `[lowerKey](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#lowerKey(K))`(K key) ` Returns the greatest key strictly less than the given key, or`null`if there is no such key.                                                                                                                                                                                                                                                                                  |
| ` V`                                                                                                                                            | ` `[merge](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#merge(K,%20V,%20java.util.function.BiFunction<?%20super%20V,?%20super%20V,?%20extends%20V>))`(K key, V value, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super V, ? super V, ? extends V> remappingFunction) ` If the specified key is not already associated with a value, associates it with the given value.                                           |
| ` `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                                          | ` `[navigableKeySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#navigableKeySet())`() ` Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                                                                                                                                                                                                       |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[pollFirstEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#pollFirstEntry())`() ` Removes and returns a key-value mapping associated with the least key in this map, or`null`if the map is empty.                                                                                                                                                                                                                                                        |
| ` `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                 | ` `[pollLastEntry](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#pollLastEntry())`() ` Removes and returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty.                                                                                                                                                                                                                                                       |
| ` V`                                                                                                                                            | ` `[put](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#put(K,%20V))`(K key, V value) ` Associates the specified value with the specified key in this map.                                                                                                                                                                                                                                                                                                       |
| ` V`                                                                                                                                            | ` `[putFirst](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#putFirst(K,%20V))`(K k, V v) ` Throws`UnsupportedOperationException`.                                                                                                                                                                                                                                                                                                                               |
| ` V`                                                                                                                                            | ` `[putIfAbsent](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#putIfAbsent(K,%20V))`(K key, V value) ` If the specified key is not already associated with a value, associates it with the given value.                                                                                                                                                                                                                                                         |
| ` V`                                                                                                                                            | ` `[putLast](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#putLast(K,%20V))`(K k, V v) ` Throws`UnsupportedOperationException`.                                                                                                                                                                                                                                                                                                                                 |
| ` V`                                                                                                                                            | ` `[remove](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#remove(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Removes the mapping for the specified key from this map if present.                                                                                                                                                                                                                            |
| ` boolean`                                                                                                                                      | ` `[remove](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#remove(java.lang.Object,%20java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, `[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Removes the entry for a key only if currently mapped to a given value.                                                                                                                         |
| ` boolean`                                                                                                                                      | ` `[replace](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#replace(K,%20V,%20V))`(K key, V oldValue, V newValue) ` Replaces the entry for a key only if currently mapped to a given value.                                                                                                                                                                                                                                                                      |
| ` V`                                                                                                                                            | ` `[replace](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#replace(K,%20V))`(K key, V value) ` Replaces the entry for a key only if currently mapped to some value.                                                                                                                                                                                                                                                                                             |
| ` void`                                                                                                                                         | ` `[replaceAll](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#replaceAll(java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(`[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> function) ` Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception. |
| ` int`                                                                                                                                          | ` `[size](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#size())`() ` Returns the number of key-value mappings in this map.                                                                                                                                                                                                                                                                                                                                      |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[subMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#subMap(K,%20boolean,%20K,%20boolean))`(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) ` Returns a view of the portion of this map whose keys range from`fromKey`to`toKey`.                                                                                                                                                                                                           |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[subMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#subMap(K,%20K))`(K fromKey, K toKey) ` Returns a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive. Equivalent to`subMap(fromKey, true, toKey, false)`.                                                                                                                                                                                                 |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[tailMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#tailMap(K,%20boolean))`(K fromKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are greater than (or equal to, if`inclusive`is true)`fromKey`.                                                                                                                                                                                                                          |
| ` `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>`                        | ` `[tailMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#tailMap(K))`(K fromKey) ` Returns a view of the portion of this map whose keys are greater than or equal to`fromKey`. Equivalent to`tailMap(fromKey, true)`.                                                                                                                                                                                                                                         |
| ` `[Collection](https://developer.android.com/reference/java/util/Collection)`<V>`                                                              | ` `[values](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#values())`() ` Returns a[Collection](https://developer.android.com/reference/java/util/Collection)view of the values contained in this map.                                                                                                                                                                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.util.AbstractMap](https://developer.android.com/reference/java/util/AbstractMap)` ` |----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` void`                                                                                                                                                  | ` `[clear](https://developer.android.com/reference/java/util/AbstractMap#clear())`() ` Removes all of the mappings from this map (optional operation).                                                                                                                                                               | | ` `[Object](https://developer.android.com/reference/java/lang/Object)                                                                                    | ` `[clone](https://developer.android.com/reference/java/util/AbstractMap#clone())`() ` Returns a shallow copy of this`AbstractMap`instance: the keys and values themselves are not cloned.                                                                                                                           | | ` boolean`                                                                                                                                               | ` `[containsKey](https://developer.android.com/reference/java/util/AbstractMap#containsKey(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns`true`if this map contains a mapping for the specified key.                                                        | | ` boolean`                                                                                                                                               | ` `[containsValue](https://developer.android.com/reference/java/util/AbstractMap#containsValue(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Returns`true`if this map maps one or more keys to the specified value.                                              | | ` abstract `[Set](https://developer.android.com/reference/java/util/Set)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | ` `[entrySet](https://developer.android.com/reference/java/util/AbstractMap#entrySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the mappings contained in this map.                                                                                                        | | ` boolean`                                                                                                                                               | ` `[equals](https://developer.android.com/reference/java/util/AbstractMap#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Compares the specified object with this map for equality.                                                                             | | ` V`                                                                                                                                                     | ` `[get](https://developer.android.com/reference/java/util/AbstractMap#get(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns the value to which the specified key is mapped, or`null`if this map contains no mapping for the key.                              | | ` int`                                                                                                                                                   | ` `[hashCode](https://developer.android.com/reference/java/util/AbstractMap#hashCode())`() ` Returns the hash code value for this map.                                                                                                                                                                               | | ` boolean`                                                                                                                                               | ` `[isEmpty](https://developer.android.com/reference/java/util/AbstractMap#isEmpty())`() ` Returns`true`if this map contains no key-value mappings.                                                                                                                                                                  | | ` `[Set](https://developer.android.com/reference/java/util/Set)`<K>`                                                                                     | ` `[keySet](https://developer.android.com/reference/java/util/AbstractMap#keySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the keys contained in this map.                                                                                                                | | ` V`                                                                                                                                                     | ` `[put](https://developer.android.com/reference/java/util/AbstractMap#put(K,%20V))`(K key, V value) ` Associates the specified value with the specified key in this map (optional operation).                                                                                                                       | | ` void`                                                                                                                                                  | ` `[putAll](https://developer.android.com/reference/java/util/AbstractMap#putAll(java.util.Map<?%20extends%20K,?%20extends%20V>))`(`[Map](https://developer.android.com/reference/java/util/Map)`<? extends K, ? extends V> m) ` Copies all of the mappings from the specified map to this map (optional operation). | | ` V`                                                                                                                                                     | ` `[remove](https://developer.android.com/reference/java/util/AbstractMap#remove(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Removes the mapping for a key from this map if it is present (optional operation).                                                  | | ` int`                                                                                                                                                   | ` `[size](https://developer.android.com/reference/java/util/AbstractMap#size())`() ` Returns the number of key-value mappings in this map.                                                                                                                                                                           | | ` `[String](https://developer.android.com/reference/java/lang/String)                                                                                    | ` `[toString](https://developer.android.com/reference/java/util/AbstractMap#toString())`() ` Returns a string representation of this map.                                                                                                                                                                            | | ` `[Collection](https://developer.android.com/reference/java/util/Collection)`<V>`                                                                       | ` `[values](https://developer.android.com/reference/java/util/AbstractMap#values())`() ` Returns a[Collection](https://developer.android.com/reference/java/util/Collection)view of the values contained in this map.                                                                                                | ||
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||
| From interface` `[java.util.Map](https://developer.android.com/reference/java/util/Map)` ` |----------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract void`                                                                                                                                         | ` `[clear](https://developer.android.com/reference/java/util/Map#clear())`() ` Removes all of the mappings from this map (optional operation).                                                                                                                                                                                                                                                                                                                                                  | | ` default V`                                                                                                                                             | ` `[compute](https://developer.android.com/reference/java/util/Map#compute(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` Attempts to compute a mapping for the specified key and its current mapped value (or`null`if there is no current mapping).                                                   | | ` default V`                                                                                                                                             | ` `[computeIfAbsent](https://developer.android.com/reference/java/util/Map#computeIfAbsent(K,%20java.util.function.Function<?%20super%20K,?%20extends%20V>))`(K key, `[Function](https://developer.android.com/reference/java/util/function/Function)`<? super K, ? extends V> mappingFunction) ` If the specified key is not already associated with a value (or is mapped to`null`), attempts to compute its value using the given mapping function and enters it into this map unless`null`. | | ` default V`                                                                                                                                             | ` `[computeIfPresent](https://developer.android.com/reference/java/util/Map#computeIfPresent(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.                  | | ` abstract boolean`                                                                                                                                      | ` `[containsKey](https://developer.android.com/reference/java/util/Map#containsKey(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns`true`if this map contains a mapping for the specified key.                                                                                                                                                                                                                                           | | ` abstract boolean`                                                                                                                                      | ` `[containsValue](https://developer.android.com/reference/java/util/Map#containsValue(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Returns`true`if this map maps one or more keys to the specified value.                                                                                                                                                                                                                                 | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[copyOf](https://developer.android.com/reference/java/util/Map#copyOf(java.util.Map<?%20extends%20K,?%20extends%20V>))`(`[Map](https://developer.android.com/reference/java/util/Map)`<? extends K, ? extends V> map) ` Returns an[unmodifiable Map](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#unmodifiable)containing the entries of the given Map.                                                                                                | | ` static <K, V> `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                            | ` `[entry](https://developer.android.com/reference/java/util/Map#entry(K,%20V))`(K k, V v) ` Returns an unmodifiable[Entry](https://developer.android.com/reference/java/util/Map.Entry)containing the given key and value.                                                                                                                                                                                                                                                                     | | ` abstract `[Set](https://developer.android.com/reference/java/util/Set)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | ` `[entrySet](https://developer.android.com/reference/java/util/Map#entrySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the mappings contained in this map.                                                                                                                                                                                                                                                                                           | | ` abstract boolean`                                                                                                                                      | ` `[equals](https://developer.android.com/reference/java/util/Map#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` o) ` Compares the specified object with this map for equality.                                                                                                                                                                                                                                                                | | ` default void`                                                                                                                                          | ` `[forEach](https://developer.android.com/reference/java/util/Map#forEach(java.util.function.BiConsumer<?%20super%20K,?%20super%20V>))`(`[BiConsumer](https://developer.android.com/reference/java/util/function/BiConsumer)`<? super K, ? super V> action) ` Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.                                                                                                    | | ` abstract V`                                                                                                                                            | ` `[get](https://developer.android.com/reference/java/util/Map#get(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Returns the value to which the specified key is mapped, or`null`if this map contains no mapping for the key.                                                                                                                                                                                                                 | | ` default V`                                                                                                                                             | ` `[getOrDefault](https://developer.android.com/reference/java/util/Map#getOrDefault(java.lang.Object,%20V))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, V defaultValue) ` Returns the value to which the specified key is mapped, or`defaultValue`if this map contains no mapping for the key.                                                                                                                                                                  | | ` abstract int`                                                                                                                                          | ` `[hashCode](https://developer.android.com/reference/java/util/Map#hashCode())`() ` Returns the hash code value for this map.                                                                                                                                                                                                                                                                                                                                                                  | | ` abstract boolean`                                                                                                                                      | ` `[isEmpty](https://developer.android.com/reference/java/util/Map#isEmpty())`() ` Returns`true`if this map contains no key-value mappings.                                                                                                                                                                                                                                                                                                                                                     | | ` abstract `[Set](https://developer.android.com/reference/java/util/Set)`<K>`                                                                            | ` `[keySet](https://developer.android.com/reference/java/util/Map#keySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the keys contained in this map.                                                                                                                                                                                                                                                                                                   | | ` default V`                                                                                                                                             | ` `[merge](https://developer.android.com/reference/java/util/Map#merge(K,%20V,%20java.util.function.BiFunction<?%20super%20V,?%20super%20V,?%20extends%20V>))`(K key, V value, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super V, ? super V, ? extends V> remappingFunction) ` If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value.                               | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5) ` Returns an unmodifiable map containing five mappings.                                                                                                                                                                                                                                                          | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4) ` Returns an unmodifiable map containing four mappings.                                                                                                                                                                                                                                                                                | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V))`(K k1, V v1) ` Returns an unmodifiable map containing a single mapping.                                                                                                                                                                                                                                                                                                                                               | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8) ` Returns an unmodifiable map containing eight mappings.                                                                                                                                                                                       | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2) ` Returns an unmodifiable map containing two mappings.                                                                                                                                                                                                                                                                                                                             | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3) ` Returns an unmodifiable map containing three mappings.                                                                                                                                                                                                                                                                                                     | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of())`() ` Returns an unmodifiable map containing zero mappings.                                                                                                                                                                                                                                                                                                                                                                  | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9) ` Returns an unmodifiable map containing nine mappings.                                                                                                                                                                  | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6) ` Returns an unmodifiable map containing six mappings.                                                                                                                                                                                                                                     | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7) ` Returns an unmodifiable map containing seven mappings.                                                                                                                                                                                                             | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[of](https://developer.android.com/reference/java/util/Map#of(K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V,%20K,%20V))`(K k1, V v1, K k2, V v2, K k3, V v3, K k4, V v4, K k5, V v5, K k6, V v6, K k7, V v7, K k8, V v8, K k9, V v9, K k10, V v10) ` Returns an unmodifiable map containing ten mappings.                                                                                                                                           | | ` static <K, V> `[Map](https://developer.android.com/reference/java/util/Map)`<K, V>`                                                                    | ` `[ofEntries](https://developer.android.com/reference/java/util/Map#ofEntries(java.util.Map.Entry<?%20extends%20K,?%20extends%20V>[]))`(`[Entry...](https://developer.android.com/reference/java/util/Map.Entry)`<? extends K, ? extends V> entries) ` Returns an unmodifiable map containing keys and values extracted from the given entries.                                                                                                                                                | | ` abstract V`                                                                                                                                            | ` `[put](https://developer.android.com/reference/java/util/Map#put(K,%20V))`(K key, V value) ` Associates the specified value with the specified key in this map (optional operation).                                                                                                                                                                                                                                                                                                          | | ` abstract void`                                                                                                                                         | ` `[putAll](https://developer.android.com/reference/java/util/Map#putAll(java.util.Map<?%20extends%20K,?%20extends%20V>))`(`[Map](https://developer.android.com/reference/java/util/Map)`<? extends K, ? extends V> m) ` Copies all of the mappings from the specified map to this map (optional operation).                                                                                                                                                                                    | | ` default V`                                                                                                                                             | ` `[putIfAbsent](https://developer.android.com/reference/java/util/Map#putIfAbsent(K,%20V))`(K key, V value) ` If the specified key is not already associated with a value (or is mapped to`null`) associates it with the given value and returns`null`, else returns the current value.                                                                                                                                                                                                        | | ` default boolean`                                                                                                                                       | ` `[remove](https://developer.android.com/reference/java/util/Map#remove(java.lang.Object,%20java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, `[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Removes the entry for the specified key only if it is currently mapped to the specified value.                                                                                                                         | | ` abstract V`                                                                                                                                            | ` `[remove](https://developer.android.com/reference/java/util/Map#remove(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key) ` Removes the mapping for a key from this map if it is present (optional operation).                                                                                                                                                                                                                                     | | ` default boolean`                                                                                                                                       | ` `[replace](https://developer.android.com/reference/java/util/Map#replace(K,%20V,%20V))`(K key, V oldValue, V newValue) ` Replaces the entry for the specified key only if currently mapped to the specified value.                                                                                                                                                                                                                                                                            | | ` default V`                                                                                                                                             | ` `[replace](https://developer.android.com/reference/java/util/Map#replace(K,%20V))`(K key, V value) ` Replaces the entry for the specified key only if it is currently mapped to some value.                                                                                                                                                                                                                                                                                                   | | ` default void`                                                                                                                                          | ` `[replaceAll](https://developer.android.com/reference/java/util/Map#replaceAll(java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(`[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> function) ` Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.                         | | ` abstract int`                                                                                                                                          | ` `[size](https://developer.android.com/reference/java/util/Map#size())`() ` Returns the number of key-value mappings in this map.                                                                                                                                                                                                                                                                                                                                                              | | ` abstract `[Collection](https://developer.android.com/reference/java/util/Collection)`<V>`                                                              | ` `[values](https://developer.android.com/reference/java/util/Map#values())`() ` Returns a[Collection](https://developer.android.com/reference/java/util/Collection)view of the values contained in this map.                                                                                                                                                                                                                                                                                   | ||
| From interface` `[java.util.concurrent.ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)` ` |-----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                   | ` `[descendingKeySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#descendingKeySet())`() ` Returns a reverse order[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                       | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[descendingMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#descendingMap())`() ` Returns a reverse order view of the mappings contained in this map.                                                                                                      | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[headMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#headMap(K))`(K toKey) ` Returns a view of the portion of this map whose keys are strictly less than`toKey`. Equivalent to`headMap(toKey, false)`.                                                    | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[headMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#headMap(K,%20boolean))`(K toKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are less than (or equal to, if`inclusive`is true)`toKey`.                                 | | ` abstract `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                   | ` `[keySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#keySet())`() ` Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                         | | ` abstract `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`                                   | ` `[navigableKeySet](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#navigableKeySet())`() ` Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                       | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[subMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#subMap(K,%20K))`(K fromKey, K toKey) ` Returns a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive. Equivalent to`subMap(fromKey, true, toKey, false)`. | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[subMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#subMap(K,%20boolean,%20K,%20boolean))`(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) ` Returns a view of the portion of this map whose keys range from`fromKey`to`toKey`.           | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[tailMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#tailMap(K,%20boolean))`(K fromKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are greater than (or equal to, if`inclusive`is true)`fromKey`.                          | | ` abstract `[ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | ` `[tailMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap#tailMap(K))`(K fromKey) ` Returns a view of the portion of this map whose keys are greater than or equal to`fromKey`. Equivalent to`tailMap(fromKey, true)`.                                         | ||
| From interface` `[java.util.concurrent.ConcurrentMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap)` ` |---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` default V`        | ` `[compute](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#compute(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` Attempts to compute a mapping for the specified key and its current mapped value (or`null`if there is no current mapping).                                                   | | ` default V`        | ` `[computeIfAbsent](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#computeIfAbsent(K,%20java.util.function.Function<?%20super%20K,?%20extends%20V>))`(K key, `[Function](https://developer.android.com/reference/java/util/function/Function)`<? super K, ? extends V> mappingFunction) ` If the specified key is not already associated with a value (or is mapped to`null`), attempts to compute its value using the given mapping function and enters it into this map unless`null`. | | ` default V`        | ` `[computeIfPresent](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#computeIfPresent(K,%20java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(K key, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> remappingFunction) ` If the value for the specified key is present and non-null, attempts to compute a new mapping given the key and its current mapped value.                  | | ` default void`     | ` `[forEach](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#forEach(java.util.function.BiConsumer<?%20super%20K,?%20super%20V>))`(`[BiConsumer](https://developer.android.com/reference/java/util/function/BiConsumer)`<? super K, ? super V> action) ` Performs the given action for each entry in this map until all entries have been processed or the action throws an exception.                                                                                                    | | ` default V`        | ` `[getOrDefault](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#getOrDefault(java.lang.Object,%20V))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, V defaultValue) ` Returns the value to which the specified key is mapped, or`defaultValue`if this map contains no mapping for the key.                                                                                                                                                                  | | ` default V`        | ` `[merge](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#merge(K,%20V,%20java.util.function.BiFunction<?%20super%20V,?%20super%20V,?%20extends%20V>))`(K key, V value, `[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super V, ? super V, ? extends V> remappingFunction) ` If the specified key is not already associated with a value or is associated with null, associates it with the given non-null value.                               | | ` abstract V`       | ` `[putIfAbsent](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#putIfAbsent(K,%20V))`(K key, V value) ` If the specified key is not already associated with a value, associates it with the given value.                                                                                                                                                                                                                                                                                 | | ` abstract boolean` | ` `[remove](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#remove(java.lang.Object,%20java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` key, `[Object](https://developer.android.com/reference/java/lang/Object)` value) ` Removes the entry for a key only if currently mapped to a given value.                                                                                                                                                 | | ` abstract boolean` | ` `[replace](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#replace(K,%20V,%20V))`(K key, V oldValue, V newValue) ` Replaces the entry for a key only if currently mapped to a given value.                                                                                                                                                                                                                                                                                              | | ` abstract V`       | ` `[replace](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#replace(K,%20V))`(K key, V value) ` Replaces the entry for a key only if currently mapped to some value.                                                                                                                                                                                                                                                                                                                     | | ` default void`     | ` `[replaceAll](https://developer.android.com/reference/java/util/concurrent/ConcurrentMap#replaceAll(java.util.function.BiFunction<?%20super%20K,?%20super%20V,?%20extends%20V>))`(`[BiFunction](https://developer.android.com/reference/java/util/function/BiFunction)`<? super K, ? super V, ? extends V> function) ` Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception.                         | ||
| From interface` `[java.util.NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)` ` |----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[ceilingEntry](https://developer.android.com/reference/java/util/NavigableMap#ceilingEntry(K))`(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.                                                                                                       | | ` abstract K`                                                                                      | ` `[ceilingKey](https://developer.android.com/reference/java/util/NavigableMap#ceilingKey(K))`(K key) ` Returns the least key greater than or equal to the given key, or`null`if there is no such key.                                                                                                                                               | | ` abstract `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`    | ` `[descendingKeySet](https://developer.android.com/reference/java/util/NavigableMap#descendingKeySet())`() ` Returns a reverse order[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                                                           | | ` abstract `[NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)`<K, V>` | ` `[descendingMap](https://developer.android.com/reference/java/util/NavigableMap#descendingMap())`() ` Returns a reverse order view of the mappings contained in this map.                                                                                                                                                                          | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[firstEntry](https://developer.android.com/reference/java/util/NavigableMap#firstEntry())`() ` Returns a key-value mapping associated with the least key in this map, or`null`if the map is empty.                                                                                                                                                | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[floorEntry](https://developer.android.com/reference/java/util/NavigableMap#floorEntry(K))`(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.                                                                                                           | | ` abstract K`                                                                                      | ` `[floorKey](https://developer.android.com/reference/java/util/NavigableMap#floorKey(K))`(K key) ` Returns the greatest key less than or equal to the given key, or`null`if there is no such key.                                                                                                                                                   | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`       | ` `[headMap](https://developer.android.com/reference/java/util/NavigableMap#headMap(K))`(K toKey) ` Returns a view of the portion of this map whose keys are strictly less than`toKey`. Equivalent to`headMap(toKey, false)`.                                                                                                                        | | ` abstract `[NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)`<K, V>` | ` `[headMap](https://developer.android.com/reference/java/util/NavigableMap#headMap(K,%20boolean))`(K toKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are less than (or equal to, if`inclusive`is true)`toKey`.                                                                                                     | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[higherEntry](https://developer.android.com/reference/java/util/NavigableMap#higherEntry(K))`(K key) ` Returns a key-value mapping associated with the least key strictly greater than the given key, or`null`if there is no such key.                                                                                                            | | ` abstract K`                                                                                      | ` `[higherKey](https://developer.android.com/reference/java/util/NavigableMap#higherKey(K))`(K key) ` Returns the least key strictly greater than the given key, or`null`if there is no such key.                                                                                                                                                    | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[lastEntry](https://developer.android.com/reference/java/util/NavigableMap#lastEntry())`() ` Returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty.                                                                                                                                               | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[lowerEntry](https://developer.android.com/reference/java/util/NavigableMap#lowerEntry(K))`(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.                                                                                                              | | ` abstract K`                                                                                      | ` `[lowerKey](https://developer.android.com/reference/java/util/NavigableMap#lowerKey(K))`(K key) ` Returns the greatest key strictly less than the given key, or`null`if there is no such key.                                                                                                                                                      | | ` abstract `[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>`    | ` `[navigableKeySet](https://developer.android.com/reference/java/util/NavigableMap#navigableKeySet())`() ` Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.                                                                                                           | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[pollFirstEntry](https://developer.android.com/reference/java/util/NavigableMap#pollFirstEntry())`() ` Removes and returns a key-value mapping associated with the least key in this map, or`null`if the map is empty.                                                                                                                            | | ` abstract `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`           | ` `[pollLastEntry](https://developer.android.com/reference/java/util/NavigableMap#pollLastEntry())`() ` Removes and returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty.                                                                                                                           | | ` default `[NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)`<K, V>`  | ` `[reversed](https://developer.android.com/reference/java/util/NavigableMap#reversed())`() ` Returns a reverse-ordered[view](https://developer.android.com/reference/java/util/concurrent/Collection#view)of this map. This method is equivalent to[descendingMap](https://developer.android.com/reference/java/util/NavigableMap#descendingMap()). | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`       | ` `[subMap](https://developer.android.com/reference/java/util/NavigableMap#subMap(K,%20K))`(K fromKey, K toKey) ` Returns a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive. Equivalent to`subMap(fromKey, true, toKey, false)`.                                                                     | | ` abstract `[NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)`<K, V>` | ` `[subMap](https://developer.android.com/reference/java/util/NavigableMap#subMap(K,%20boolean,%20K,%20boolean))`(K fromKey, boolean fromInclusive, K toKey, boolean toInclusive) ` Returns a view of the portion of this map whose keys range from`fromKey`to`toKey`.                                                                               | | ` abstract `[NavigableMap](https://developer.android.com/reference/java/util/NavigableMap)`<K, V>` | ` `[tailMap](https://developer.android.com/reference/java/util/NavigableMap#tailMap(K,%20boolean))`(K fromKey, boolean inclusive) ` Returns a view of the portion of this map whose keys are greater than (or equal to, if`inclusive`is true)`fromKey`.                                                                                              | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`       | ` `[tailMap](https://developer.android.com/reference/java/util/NavigableMap#tailMap(K))`(K fromKey) ` Returns a view of the portion of this map whose keys are greater than or equal to`fromKey`. Equivalent to`tailMap(fromKey, true)`.                                                                                                             | ||
| From interface` `[java.util.SortedMap](https://developer.android.com/reference/java/util/SortedMap)` ` |----------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract `[Comparator](https://developer.android.com/reference/java/util/Comparator)`<? super K>`                                                      | ` `[comparator](https://developer.android.com/reference/java/util/SortedMap#comparator())`() ` Returns the comparator used to order the keys in this map, or`null`if this map uses the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of its keys. | | ` abstract `[Set](https://developer.android.com/reference/java/util/Set)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | ` `[entrySet](https://developer.android.com/reference/java/util/SortedMap#entrySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the mappings contained in this map.                                                                        | | ` abstract K`                                                                                                                                            | ` `[firstKey](https://developer.android.com/reference/java/util/SortedMap#firstKey())`() ` Returns the first (lowest) key currently in this map.                                                                                                                                   | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`                                                             | ` `[headMap](https://developer.android.com/reference/java/util/SortedMap#headMap(K))`(K toKey) ` Returns a view of the portion of this map whose keys are strictly less than`toKey`.                                                                                               | | ` abstract `[Set](https://developer.android.com/reference/java/util/Set)`<K>`                                                                            | ` `[keySet](https://developer.android.com/reference/java/util/SortedMap#keySet())`() ` Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the keys contained in this map.                                                                                | | ` abstract K`                                                                                                                                            | ` `[lastKey](https://developer.android.com/reference/java/util/SortedMap#lastKey())`() ` Returns the last (highest) key currently in this map.                                                                                                                                     | | ` default V`                                                                                                                                             | ` `[putFirst](https://developer.android.com/reference/java/util/SortedMap#putFirst(K,%20V))`(K k, V v) ` Throws`UnsupportedOperationException`.                                                                                                                                    | | ` default V`                                                                                                                                             | ` `[putLast](https://developer.android.com/reference/java/util/SortedMap#putLast(K,%20V))`(K k, V v) ` Throws`UnsupportedOperationException`.                                                                                                                                      | | ` default `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`                                                              | ` `[reversed](https://developer.android.com/reference/java/util/SortedMap#reversed())`() ` Returns a reverse-ordered[view](https://developer.android.com/reference/java/util/concurrent/Collection#view)of this map.                                                               | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`                                                             | ` `[subMap](https://developer.android.com/reference/java/util/SortedMap#subMap(K,%20K))`(K fromKey, K toKey) ` Returns a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive.                                                          | | ` abstract `[SortedMap](https://developer.android.com/reference/java/util/SortedMap)`<K, V>`                                                             | ` `[tailMap](https://developer.android.com/reference/java/util/SortedMap#tailMap(K))`(K fromKey) ` Returns a view of the portion of this map whose keys are greater than or equal to`fromKey`.                                                                                     | | ` abstract `[Collection](https://developer.android.com/reference/java/util/Collection)`<V>`                                                              | ` `[values](https://developer.android.com/reference/java/util/SortedMap#values())`() ` Returns a[Collection](https://developer.android.com/reference/java/util/Collection)view of the values contained in this map.                                                                | ||
| From interface` `[java.util.SequencedMap](https://developer.android.com/reference/java/util/SequencedMap)` ` |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` default `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                                   | ` `[firstEntry](https://developer.android.com/reference/java/util/SequencedMap#firstEntry())`() ` Returns the first key-value mapping in this map, or`null`if the map is empty.                                                                                    | | ` default `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                                   | ` `[lastEntry](https://developer.android.com/reference/java/util/SequencedMap#lastEntry())`() ` Returns the last key-value mapping in this map, or`null`if the map is empty.                                                                                       | | ` default `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                                   | ` `[pollFirstEntry](https://developer.android.com/reference/java/util/SequencedMap#pollFirstEntry())`() ` Removes and returns the first key-value mapping in this map, or`null`if the map is empty (optional operation).                                           | | ` default `[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>`                                                                                   | ` `[pollLastEntry](https://developer.android.com/reference/java/util/SequencedMap#pollLastEntry())`() ` Removes and returns the last key-value mapping in this map, or`null`if the map is empty (optional operation).                                              | | ` default V`                                                                                                                                                              | ` `[putFirst](https://developer.android.com/reference/java/util/SequencedMap#putFirst(K,%20V))`(K k, V v) ` Inserts the given mapping into the map if it is not already present, or replaces the value of a mapping if it is already present (optional operation). | | ` default V`                                                                                                                                                              | ` `[putLast](https://developer.android.com/reference/java/util/SequencedMap#putLast(K,%20V))`(K k, V v) ` Inserts the given mapping into the map if it is not already present, or replaces the value of a mapping if it is already present (optional operation).   | | ` abstract `[SequencedMap](https://developer.android.com/reference/java/util/SequencedMap)`<K, V>`                                                                        | ` `[reversed](https://developer.android.com/reference/java/util/SequencedMap#reversed())`() ` Returns a reverse-ordered[view](https://developer.android.com/reference/java/util/concurrent/Collection#view)of this map.                                            | | ` default `[SequencedSet](https://developer.android.com/reference/java/util/SequencedSet)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | ` `[sequencedEntrySet](https://developer.android.com/reference/java/util/SequencedMap#sequencedEntrySet())`() ` Returns a`SequencedSet`view of this map's[entrySet](https://developer.android.com/reference/java/util/Map#entrySet()).                             | | ` default `[SequencedSet](https://developer.android.com/reference/java/util/SequencedSet)`<K>`                                                                            | ` `[sequencedKeySet](https://developer.android.com/reference/java/util/SequencedMap#sequencedKeySet())`() ` Returns a`SequencedSet`view of this map's[keySet](https://developer.android.com/reference/java/util/Map#keySet()).                                     | | ` default `[SequencedCollection](https://developer.android.com/reference/java/util/SequencedCollection)`<V>`                                                              | ` `[sequencedValues](https://developer.android.com/reference/java/util/SequencedMap#sequencedValues())`() ` Returns a`SequencedCollection`view of this map's[values](https://developer.android.com/reference/java/util/Map#values())collection.                    | ||

## Public constructors

### ConcurrentSkipListMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentSkipListMap ()
```

Constructs a new, empty map, sorted according to the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of the keys.

<br />

### ConcurrentSkipListMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentSkipListMap (Comparator<? super K> comparator)
```

Constructs a new, empty map, sorted according to the specified comparator.

<br />

|                                                                                              Parameters                                                                                               ||
|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `comparator` | `Comparator`: the comparator that will be used to order this map. If`null`, the[ordering](https://developer.android.com/reference/java/lang/Comparable)of the keys will be used. <br /> |

### ConcurrentSkipListMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentSkipListMap (Map<? extends K, ? extends V> m)
```

Constructs a new map containing the same mappings as the given map, sorted according to the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of the keys.

<br />

|                               Parameters                               ||
|-----|-------------------------------------------------------------------|
| `m` | `Map`: the map whose mappings are to be placed in this map <br /> |

|                                                                                                               Throws                                                                                                               ||
|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the keys in`m`are not[Comparable](https://developer.android.com/reference/java/lang/Comparable), or are not mutually comparable |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified map or any of its keys or values are null                                                                         |

### ConcurrentSkipListMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentSkipListMap (SortedMap<K, ? extends V> m)
```

Constructs a new map containing the same mappings and using the same ordering as the specified sorted map.

<br />

|                                                                Parameters                                                                ||
|-----|-------------------------------------------------------------------------------------------------------------------------------------|
| `m` | `SortedMap`: the sorted map whose mappings are to be placed in this map, and whose comparator is to be used to sort this map <br /> |

|                                                                              Throws                                                                               ||
|------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified sorted map or any of its keys or values are null |

## Public methods

### ceilingEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<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 entry. The returned entry does*not* support the`Entry.setValue`method.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                                                                     Returns                                                                                     ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the least key greater than or equal to`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### ceilingKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K ceilingKey (K key)
```

Returns the least key greater than or equal to the given key, or`null`if there is no such key.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                         Returns                                          ||
|-----|-------------------------------------------------------------------------------------|
| `K` | the least key greater than or equal to`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### clear

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void clear ()
```

Removes all of the mappings from this map.

<br />

### clone

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentSkipListMap<K, V> clone ()
```

Returns a shallow copy of this`ConcurrentSkipListMap`instance. (The keys and values themselves are not cloned.)

<br />

|                                                                        Returns                                                                         ||
|---------------------------------------------------------------------------------------------------------------------|-----------------------------------|
| [ConcurrentSkipListMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap)`<K, V>` | a shallow copy of this map <br /> |

### comparator

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Comparator<? super K> comparator ()
```

Returns the comparator used to order the keys in this map, or`null`if this map uses the[natural ordering](https://developer.android.com/reference/java/lang/Comparable)of its keys.

<br />

|                                                                                                   Returns                                                                                                    ||
|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| [Comparator](https://developer.android.com/reference/java/util/Comparator)`<? super K>` | the comparator used to order the keys in this map, or`null`if this map uses the natural ordering of its keys <br /> |

### compute

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V compute (K key, 
                BiFunction<? super K, ? super V, ? extends V> remappingFunction)
```

Attempts to compute a mapping for the specified key and its current mapped value (or`null`if there is no current mapping). The function is*NOT*guaranteed to be applied once atomically.

<br />

|                                       Parameters                                        ||
|---------------------|--------------------------------------------------------------------|
| `key`               | `K`: key with which the specified value is to be associated <br /> |
| `remappingFunction` | `BiFunction`: the function to compute a value <br />               |

|                                   Returns                                    ||
|-----|-------------------------------------------------------------------------|
| `V` | the new value associated with the specified key, or null if none <br /> |

|                                                                            Throws                                                                             ||
|------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null or the remappingFunction is null |

### computeIfAbsent

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V computeIfAbsent (K key, 
                Function<? super K, ? extends V> mappingFunction)
```

If the specified key is not already associated with a value, attempts to compute its value using the given mapping function and enters it into this map unless`null`. The function is*NOT*guaranteed to be applied once atomically only if the value is not present.

<br />

|                                      Parameters                                       ||
|-------------------|--------------------------------------------------------------------|
| `key`             | `K`: key with which the specified value is to be associated <br /> |
| `mappingFunction` | `Function`: the function to compute a value <br />                 |

|                                                            Returns                                                            ||
|-----|--------------------------------------------------------------------------------------------------------------------------|
| `V` | the current (existing or computed) value associated with the specified key, or null if the computed value is null <br /> |

|                                                                           Throws                                                                            ||
|------------------------------------------------------------------------------------------------|-------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null or the mappingFunction is null |

### computeIfPresent

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V computeIfPresent (K key, 
                BiFunction<? super K, ? super V, ? extends V> remappingFunction)
```

If the value for the specified key is present, attempts to compute a new mapping given the key and its current mapped value. The function is*NOT*guaranteed to be applied once atomically.

<br />

|                                Parameters                                 ||
|---------------------|------------------------------------------------------|
| `key`               | `K`: key with which a value may be associated <br /> |
| `remappingFunction` | `BiFunction`: the function to compute a value <br /> |

|                                   Returns                                    ||
|-----|-------------------------------------------------------------------------|
| `V` | the new value associated with the specified key, or null if none <br /> |

|                                                                            Throws                                                                             ||
|------------------------------------------------------------------------------------------------|---------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null or the remappingFunction is null |

### containsKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean containsKey (Object key)
```

Returns`true`if this map contains a mapping for the specified key.

<br />

|                               Parameters                               ||
|-------|-----------------------------------------------------------------|
| `key` | `Object`: key whose presence in this map is to be tested <br /> |

|                                   Returns                                    ||
|-----------|-------------------------------------------------------------------|
| `boolean` | `true`if this map contains a mapping for the specified key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null                                               |

### containsValue

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean containsValue (Object value)
```

Returns`true`if this map maps one or more keys to the specified value. This operation requires time linear in the map size. Additionally, it is possible for the map to change during execution of this method, in which case the returned result may be inaccurate.

<br />

|                                 Parameters                                 ||
|---------|-------------------------------------------------------------------|
| `value` | `Object`: value whose presence in this map is to be tested <br /> |

|                                Returns                                ||
|-----------|------------------------------------------------------------|
| `boolean` | `true`if a mapping to`value`exists;`false`otherwise <br /> |

|                                                             Throws                                                             ||
|------------------------------------------------------------------------------------------------|--------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified value is null |

### descendingKeySet

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public NavigableSet<K> descendingKeySet ()
```

Returns a reverse order[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map. The set's iterator returns the keys in descending order. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the`Iterator.remove`,`Set.remove`,`removeAll`,`retainAll`, and`clear`operations. It does not support the`add`or`addAll`operations.

The view's iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

<br />

|                                                                        Returns                                                                         ||
|-------------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>` | a reverse order navigable set view of the keys in this map <br /> |

### descendingMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> descendingMap ()
```

Returns a reverse order view of the mappings contained in this map. The descending map is backed by this map, so changes to the map are reflected in the descending map, and vice-versa.

The returned map has an ordering equivalent to[Collections.reverseOrder](https://developer.android.com/reference/java/util/Collections#reverseOrder(java.util.Comparator<T>))`(comparator())`. The expression`m.descendingMap().descendingMap()`returns a view of`m`essentially equivalent to`m`.

<br />

|                                                                            Returns                                                                             ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a reverse order view of this map <br /> |

### entrySet

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Set<Entry<K, V>> entrySet ()
```

Returns a[Set](https://developer.android.com/reference/java/util/Set)view of the mappings contained in this map.

The set's iterator returns the entries in ascending key order. The set's spliterator additionally reports[Spliterator.CONCURRENT](https://developer.android.com/reference/java/util/Spliterator#CONCURRENT),[Spliterator.NONNULL](https://developer.android.com/reference/java/util/Spliterator#NONNULL),[Spliterator.SORTED](https://developer.android.com/reference/java/util/Spliterator#SORTED)and[Spliterator.ORDERED](https://developer.android.com/reference/java/util/Spliterator#ORDERED), with an encounter order that is ascending key order.

The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the`Iterator.remove`,`Set.remove`,`removeAll`,`retainAll`and`clear`operations. It does not support the`add`or`addAll`operations.

The view's iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

The`Map.Entry`elements traversed by the`iterator`or`spliterator`do*not* support the`setValue`operation.

<br />

|                                                                                                               Returns                                                                                                                ||
|----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------|
| [Set](https://developer.android.com/reference/java/util/Set)`<`[Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>>` | a set view of the mappings contained in this map, sorted in ascending key order <br /> |

### equals

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean equals (Object o)
```

Compares the specified object with this map for equality. Returns`true`if the given object is also a map and the two maps represent the same mappings. More formally, two maps`m1`and`m2`represent the same mappings if`m1.entrySet().equals(m2.entrySet())`. This operation may return misleading results if either map is concurrently modified during execution of this method.

<br />

|                               Parameters                               ||
|-----|-------------------------------------------------------------------|
| `o` | `Object`: object to be compared for equality with this map <br /> |

|                               Returns                                ||
|-----------|-----------------------------------------------------------|
| `boolean` | `true`if the specified object is equal to this map <br /> |

### firstEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<K, V> firstEntry ()
```

Returns a key-value mapping associated with the least key in this map, or`null`if the map is empty. The returned entry does*not* support the`Entry.setValue`method.

<br />

|                                                                    Returns                                                                     ||
|------------------------------------------------------------------------------|------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the least key, or`null`if this map is empty <br /> |

### firstKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K firstKey ()
```

Returns the first (lowest) key currently in this map.

<br />

|                         Returns                          ||
|-----|-----------------------------------------------------|
| `K` | the first (lowest) key currently in this map <br /> |

|                                                Throws                                                 ||
|----------------------------------------------------------------------------------------------------|---|
| [NoSuchElementException](https://developer.android.com/reference/java/util/NoSuchElementException) |   |

### floorEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<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. The returned entry does*not* support the`Entry.setValue`method.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                                                                     Returns                                                                                     ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the greatest key less than or equal to`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### floorKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K floorKey (K key)
```

Returns the greatest key less than or equal to the given key, or`null`if there is no such key.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                         Returns                                          ||
|-----|-------------------------------------------------------------------------------------|
| `K` | the greatest key less than or equal to`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### forEach

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void forEach (BiConsumer<? super K, ? super V> action)
```

Performs the given action for each entry in this map until all entries have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of entry set iteration (if an iteration order is specified.) Exceptions thrown by the action are relayed to the caller.

<br />

|                                Parameters                                ||
|----------|----------------------------------------------------------------|
| `action` | `BiConsumer`: The action to be performed for each entry <br /> |

### get

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V get (Object key)
```

Returns the value to which the specified key is mapped, or`null`if this map contains no mapping for the key.

More formally, if this map contains a mapping from a key`k`to a value`v`such that`key`compares equal to`k`according to the map's ordering, then this method returns`v`; otherwise it returns`null`. (There can be at most one such mapping.)

<br />

|                                Parameters                                ||
|-------|-------------------------------------------------------------------|
| `key` | `Object`: the key whose associated value is to be returned <br /> |

|                                                     Returns                                                     ||
|-----|------------------------------------------------------------------------------------------------------------|
| `V` | the value to which the specified key is mapped, or`null`if this map contains no mapping for the key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null                                               |

### getOrDefault

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V getOrDefault (Object key, 
                V defaultValue)
```

Returns the value to which the specified key is mapped, or the given defaultValue if this map contains no mapping for the key.

<br />

|                                            Parameters                                             ||
|----------------|-----------------------------------------------------------------------------------|
| `key`          | `Object`: the key <br />                                                          |
| `defaultValue` | `V`: the value to return if this map contains no mapping for the given key <br /> |

|                                Returns                                 ||
|-----|-------------------------------------------------------------------|
| `V` | the mapping for the key, if present; else the defaultValue <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### headMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> headMap (K toKey)
```

Returns a view of the portion of this map whose keys are strictly less than`toKey`. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside its range.

Equivalent to`headMap(toKey, false)`.

<br />

|                                   Parameters                                   ||
|---------|-----------------------------------------------------------------------|
| `toKey` | `K`: high endpoint (exclusive) of the keys in the returned map <br /> |

|                                                                                                 Returns                                                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys are strictly less than`toKey` <br /> |

|                                                          Throws                                                          ||
|--------------------------------------------------------------------------------------------------------|------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                  |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`toKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                  |

### headMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> headMap (K toKey, 
                boolean inclusive)
```

Returns a view of the portion of this map whose keys are less than (or equal to, if`inclusive`is true)`toKey`. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside its range.

<br />

|                                           Parameters                                            ||
|-------------|------------------------------------------------------------------------------------|
| `toKey`     | `K`: high endpoint of the keys in the returned map <br />                          |
| `inclusive` | `boolean`:`true`if the high endpoint is to be included in the returned view <br /> |

|                                                                                                               Returns                                                                                                               ||
|-----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys are less than (or equal to, if`inclusive`is true)`toKey` <br /> |

|                                                          Throws                                                          ||
|--------------------------------------------------------------------------------------------------------|------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                  |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`toKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                  |

### higherEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<K, V> higherEntry (K key)
```

Returns a key-value mapping associated with the least key strictly greater than the given key, or`null`if there is no such key. The returned entry does*not* support the`Entry.setValue`method.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                                                               Returns                                                                               ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the least key greater than`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### higherKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K higherKey (K key)
```

Returns the least key strictly greater than the given key, or`null`if there is no such key.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                   Returns                                    ||
|-----|-------------------------------------------------------------------------|
| `K` | the least key greater than`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### isEmpty

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isEmpty ()
```

Returns`true`if this map contains no key-value mappings.

<br />

|                              Returns                               ||
|-----------|---------------------------------------------------------|
| `boolean` | `true`if this map contains no key-value mappings <br /> |

### keySet

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public NavigableSet<K> keySet ()
```

Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map.

The set's iterator returns the keys in ascending order. The set's spliterator additionally reports[Spliterator.CONCURRENT](https://developer.android.com/reference/java/util/Spliterator#CONCURRENT),[Spliterator.NONNULL](https://developer.android.com/reference/java/util/Spliterator#NONNULL),[Spliterator.SORTED](https://developer.android.com/reference/java/util/Spliterator#SORTED)and[Spliterator.ORDERED](https://developer.android.com/reference/java/util/Spliterator#ORDERED), with an encounter order that is ascending key order.

The[spliterator's comparator](https://developer.android.com/reference/java/util/Spliterator#getComparator())is`null`if the[map's comparator](https://developer.android.com/reference/java/util/concurrent/ConcurrentSkipListMap#comparator())is`null`. Otherwise, the spliterator's comparator is the same as or imposes the same total ordering as the map's comparator.

The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the`Iterator.remove`,`Set.remove`,`removeAll`,`retainAll`, and`clear`operations. It does not support the`add`or`addAll`operations.

The view's iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

This method is equivalent to method`navigableKeySet`.

<br />

|                                                                 Returns                                                                  ||
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>` | a navigable set view of the keys in this map <br /> |

### lastEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<K, V> lastEntry ()
```

Returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty. The returned entry does*not* support the`Entry.setValue`method.

<br />

|                                                                      Returns                                                                      ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the greatest key, or`null`if this map is empty <br /> |

### lastKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K lastKey ()
```

Returns the last (highest) key currently in this map.

<br />

|                         Returns                          ||
|-----|-----------------------------------------------------|
| `K` | the last (highest) key currently in this map <br /> |

|                                                Throws                                                 ||
|----------------------------------------------------------------------------------------------------|---|
| [NoSuchElementException](https://developer.android.com/reference/java/util/NoSuchElementException) |   |

### lowerEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<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. The returned entry does*not* support the`Entry.setValue`method.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                                                               Returns                                                                               ||
|------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | an entry with the greatest key less than`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### lowerKey

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public K lowerKey (K key)
```

Returns the greatest key strictly less than the given key, or`null`if there is no such key.

<br />

|         Parameters         ||
|-------|---------------------|
| `key` | `K`: the key <br /> |

|                                   Returns                                    ||
|-----|-------------------------------------------------------------------------|
| `K` | the greatest key less than`key`, or`null`if there is no such key <br /> |

|                                                            Throws                                                            ||
|------------------------------------------------------------------------------------------------|------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     |                              |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null |

### merge

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V merge (K key, 
                V value, 
                BiFunction<? super V, ? super V, ? extends V> remappingFunction)
```

If the specified key is not already associated with a value, associates it with the given value. Otherwise, replaces the value with the results of the given remapping function, or removes if`null`. The function is*NOT*guaranteed to be applied once atomically.

<br />

|                                       Parameters                                        ||
|---------------------|--------------------------------------------------------------------|
| `key`               | `K`: key with which the specified value is to be associated <br /> |
| `value`             | `V`: the value to use if absent <br />                             |
| `remappingFunction` | `BiFunction`: the function to recompute a value if present <br />  |

|                                   Returns                                    ||
|-----|-------------------------------------------------------------------------|
| `V` | the new value associated with the specified key, or null if none <br /> |

|                                                                                 Throws                                                                                 ||
|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key or value is null or the remappingFunction is null |

### navigableKeySet

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public NavigableSet<K> navigableKeySet ()
```

Returns a[NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)view of the keys contained in this map. The set's iterator returns the keys in ascending order. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. The set supports element removal, which removes the corresponding mapping from the map, via the`Iterator.remove`,`Set.remove`,`removeAll`,`retainAll`, and`clear`operations. It does not support the`add`or`addAll`operations.

The view's iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

<br />

|                                                                 Returns                                                                  ||
|-------------------------------------------------------------------------------------|-----------------------------------------------------|
| [NavigableSet](https://developer.android.com/reference/java/util/NavigableSet)`<K>` | a navigable set view of the keys in this map <br /> |

### pollFirstEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<K, V> pollFirstEntry ()
```

Removes and returns a key-value mapping associated with the least key in this map, or`null`if the map is empty. The returned entry does*not* support the`Entry.setValue`method.

<br />

|                                                                        Returns                                                                         ||
|------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | the removed first entry of this map, or`null`if this map is empty <br /> |

### pollLastEntry

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Entry<K, V> pollLastEntry ()
```

Removes and returns a key-value mapping associated with the greatest key in this map, or`null`if the map is empty. The returned entry does*not* support the`Entry.setValue`method.

<br />

|                                                                        Returns                                                                        ||
|------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| [Entry](https://developer.android.com/reference/java/util/Map.Entry)`<K, V>` | the removed last entry of this map, or`null`if this map is empty <br /> |

### put

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V put (K key, 
                V value)
```

Associates the specified value with the specified key in this map. If the map previously contained a mapping for the key, the old value is replaced.

<br />

|                                 Parameters                                  ||
|---------|--------------------------------------------------------------------|
| `key`   | `K`: key with which the specified value is to be associated <br /> |
| `value` | `V`: value to be associated with the specified key <br />          |

|                                                    Returns                                                    ||
|-----|----------------------------------------------------------------------------------------------------------|
| `V` | the previous value associated with the specified key, or`null`if there was no mapping for the key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key or value is null                                      |

### putFirst

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V putFirst (K k, 
                V v)
```

Throws`UnsupportedOperationException`. The encounter order induced by this map's comparison method determines the position of mappings, so explicit positioning is not supported.

<br />

|         Parameters         ||
|-----|-----------------------|
| `k` | `K`: the key <br />   |
| `v` | `V`: the value <br /> |

|                               Returns                               ||
|-----|----------------------------------------------------------------|
| `V` | the value previously associated with k, or null if none <br /> |

|                                                          Throws                                                          ||
|------------------------------------------------------------------------------------------------------------------|--------|
| [UnsupportedOperationException](https://developer.android.com/reference/java/lang/UnsupportedOperationException) | always |

### putIfAbsent

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V putIfAbsent (K key, 
                V value)
```

If the specified key is not already associated with a value, associates it with the given value. This is equivalent to, for this`map`:  

     if (!map.containsKey(key))
       return map.put(key, value);
     else
       return map.get(key);

except that the action is performed atomically.

<br />

<br />

|                                 Parameters                                  ||
|---------|--------------------------------------------------------------------|
| `key`   | `K`: key with which the specified value is to be associated <br /> |
| `value` | `V`: value to be associated with the specified key <br />          |

|                                                    Returns                                                    ||
|-----|----------------------------------------------------------------------------------------------------------|
| `V` | the previous value associated with the specified key, or`null`if there was no mapping for the key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key or value is null                                      |

### putLast

Added in[API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V putLast (K k, 
                V v)
```

Throws`UnsupportedOperationException`. The encounter order induced by this map's comparison method determines the position of mappings, so explicit positioning is not supported.

<br />

|         Parameters         ||
|-----|-----------------------|
| `k` | `K`: the key <br />   |
| `v` | `V`: the value <br /> |

|                               Returns                               ||
|-----|----------------------------------------------------------------|
| `V` | the value previously associated with k, or null if none <br /> |

|                                                          Throws                                                          ||
|------------------------------------------------------------------------------------------------------------------|--------|
| [UnsupportedOperationException](https://developer.android.com/reference/java/lang/UnsupportedOperationException) | always |

### remove

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V remove (Object key)
```

Removes the mapping for the specified key from this map if present.

<br />

|                           Parameters                            ||
|-------|----------------------------------------------------------|
| `key` | `Object`: key for which mapping should be removed <br /> |

|                                                    Returns                                                    ||
|-----|----------------------------------------------------------------------------------------------------------|
| `V` | the previous value associated with the specified key, or`null`if there was no mapping for the key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null                                               |

### remove

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean remove (Object key, 
                Object value)
```

Removes the entry for a key only if currently mapped to a given value. This is equivalent to, for this`map`:  

     if (map.containsKey(key)
         && Objects.equals(map.get(key), value)) {
       map.remove(key);
       return true;
     } else {
       return false;
     }

except that the action is performed atomically.

<br />

<br />

|                                    Parameters                                    ||
|---------|-------------------------------------------------------------------------|
| `key`   | `Object`: key with which the specified value is associated <br />       |
| `value` | `Object`: value expected to be associated with the specified key <br /> |

|                     Returns                      ||
|-----------|---------------------------------------|
| `boolean` | `true`if the value was removed <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key is null                                               |

### replace

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean replace (K key, 
                V oldValue, 
                V newValue)
```

Replaces the entry for a key only if currently mapped to a given value. This is equivalent to, for this`map`:  

     if (map.containsKey(key)
         && Objects.equals(map.get(key), oldValue)) {
       map.put(key, newValue);
       return true;
     } else {
       return false;
     }

except that the action is performed atomically.

<br />

<br />

|                                   Parameters                                   ||
|------------|--------------------------------------------------------------------|
| `key`      | `K`: key with which the specified value is associated <br />       |
| `oldValue` | `V`: value expected to be associated with the specified key <br /> |
| `newValue` | `V`: value to be associated with the specified key <br />          |

|                      Returns                      ||
|-----------|----------------------------------------|
| `boolean` | `true`if the value was replaced <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if any of the arguments are null                                           |

### replace

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public V replace (K key, 
                V value)
```

Replaces the entry for a key only if currently mapped to some value. This is equivalent to, for this`map`:  

     if (map.containsKey(key))
       return map.put(key, value);
     else
       return null;

except that the action is performed atomically.

<br />

<br />

|                              Parameters                               ||
|---------|--------------------------------------------------------------|
| `key`   | `K`: key with which the specified value is associated <br /> |
| `value` | `V`: value to be associated with the specified key <br />    |

|                                                    Returns                                                    ||
|-----|----------------------------------------------------------------------------------------------------------|
| `V` | the previous value associated with the specified key, or`null`if there was no mapping for the key <br /> |

|                                                                                   Throws                                                                                   ||
|------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)     | if the specified key cannot be compared with the keys currently in the map |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException) | if the specified key or value is null                                      |

### replaceAll

Added in[API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void replaceAll (BiFunction<? super K, ? super V, ? extends V> function)
```

Replaces each entry's value with the result of invoking the given function on that entry until all entries have been processed or the function throws an exception. Exceptions thrown by the function are relayed to the caller.

<br />

|                              Parameters                              ||
|------------|----------------------------------------------------------|
| `function` | `BiFunction`: the function to apply to each entry <br /> |

### size

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public int size ()
```

Returns the number of key-value mappings in this map. If the map contains more than`Integer.MAX_VALUE`elements, returns`Integer.MAX_VALUE`.

<br />

|                          Returns                           ||
|-------|-----------------------------------------------------|
| `int` | the number of key-value mappings in this map <br /> |

### subMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> subMap (K fromKey, 
                boolean fromInclusive, 
                K toKey, 
                boolean toInclusive)
```

Returns a view of the portion of this map whose keys range from`fromKey`to`toKey`. If`fromKey`and`toKey`are equal, the returned map is empty unless`fromInclusive`and`toInclusive`are both true. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside of its range, or to construct a submap either of whose endpoints lie outside its range.

<br />

|                                             Parameters                                              ||
|-----------------|------------------------------------------------------------------------------------|
| `fromKey`       | `K`: low endpoint of the keys in the returned map <br />                           |
| `fromInclusive` | `boolean`:`true`if the low endpoint is to be included in the returned view <br />  |
| `toKey`         | `K`: high endpoint of the keys in the returned map <br />                          |
| `toInclusive`   | `boolean`:`true`if the high endpoint is to be included in the returned view <br /> |

|                                                                                                 Returns                                                                                                 ||
|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys range from`fromKey`to`toKey` <br /> |

|                                                               Throws                                                                ||
|--------------------------------------------------------------------------------------------------------|-----------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                             |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`fromKey`or`toKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                             |

### subMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> subMap (K fromKey, 
                K toKey)
```

Returns a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive. (If`fromKey`and`toKey`are equal, the returned map is empty.) The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside its range.

Equivalent to`subMap(fromKey, true, toKey, false)`.

<br />

|                                    Parameters                                    ||
|-----------|-----------------------------------------------------------------------|
| `fromKey` | `K`: low endpoint (inclusive) of the keys in the returned map <br />  |
| `toKey`   | `K`: high endpoint (exclusive) of the keys in the returned map <br /> |

|                                                                                                             Returns                                                                                                             ||
|-----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys range from`fromKey`, inclusive, to`toKey`, exclusive <br /> |

|                                                               Throws                                                                ||
|--------------------------------------------------------------------------------------------------------|-----------------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                             |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`fromKey`or`toKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                             |

### tailMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> tailMap (K fromKey, 
                boolean inclusive)
```

Returns a view of the portion of this map whose keys are greater than (or equal to, if`inclusive`is true)`fromKey`. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside its range.

<br />

|                                           Parameters                                           ||
|-------------|-----------------------------------------------------------------------------------|
| `fromKey`   | `K`: low endpoint of the keys in the returned map <br />                          |
| `inclusive` | `boolean`:`true`if the low endpoint is to be included in the returned view <br /> |

|                                                                                                                 Returns                                                                                                                  ||
|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys are greater than (or equal to, if`inclusive`is true)`fromKey` <br /> |

|                                                           Throws                                                           ||
|--------------------------------------------------------------------------------------------------------|--------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                    |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`fromKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                    |

### tailMap

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public ConcurrentNavigableMap<K, V> tailMap (K fromKey)
```

Returns a view of the portion of this map whose keys are greater than or equal to`fromKey`. The returned map is backed by this map, so changes in the returned map are reflected in this map, and vice-versa. The returned map supports all optional map operations that this map supports.

The returned map will throw an`IllegalArgumentException`on an attempt to insert a key outside its range.

Equivalent to`tailMap(fromKey, true)`.

<br />

|                                   Parameters                                    ||
|-----------|----------------------------------------------------------------------|
| `fromKey` | `K`: low endpoint (inclusive) of the keys in the returned map <br /> |

|                                                                                                     Returns                                                                                                      ||
|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| [ConcurrentNavigableMap](https://developer.android.com/reference/java/util/concurrent/ConcurrentNavigableMap)`<K, V>` | a view of the portion of this map whose keys are greater than or equal to`fromKey` <br /> |

|                                                           Throws                                                           ||
|--------------------------------------------------------------------------------------------------------|--------------------|
| [ClassCastException](https://developer.android.com/reference/java/lang/ClassCastException)             |                    |
| [NullPointerException](https://developer.android.com/reference/java/lang/NullPointerException)         | if`fromKey`is null |
| [IllegalArgumentException](https://developer.android.com/reference/java/lang/IllegalArgumentException) |                    |

### values

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public Collection<V> values ()
```

Returns a[Collection](https://developer.android.com/reference/java/util/Collection)view of the values contained in this map.

The collection's iterator returns the values in ascending order of the corresponding keys. The collections's spliterator additionally reports[Spliterator.CONCURRENT](https://developer.android.com/reference/java/util/Spliterator#CONCURRENT),[Spliterator.NONNULL](https://developer.android.com/reference/java/util/Spliterator#NONNULL)and[Spliterator.ORDERED](https://developer.android.com/reference/java/util/Spliterator#ORDERED), with an encounter order that is ascending order of the corresponding keys.

The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from the map, via the`Iterator.remove`,`Collection.remove`,`removeAll`,`retainAll`and`clear`operations. It does not support the`add`or`addAll`operations.

The view's iterators and spliterators are[*weakly consistent*](https://developer.android.com/reference/java/util/concurrent/package-summary#Weakly).

<br />

|                                                                    Returns                                                                    ||
|---------------------------------------------------------------------------------|--------------------------------------------------------------|
| [Collection](https://developer.android.com/reference/java/util/Collection)`<V>` | a collection view of the values contained in this map <br /> |