# ConcurrentHashMap.KeySetView

public static class **ConcurrentHashMap.KeySetView** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
implements [Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<K\> [Serializable](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Serializable.html) [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<K\> [Serializable](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/Serializable.html) A view of a ConcurrentHashMap as a `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html` of keys, in
which additions may optionally be enabled by mapping to a
common value. This class cannot be directly instantiated.
See `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.html#keySet(V)`,
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.html#newKeySet()`,
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.html#newKeySet(int)`.

### Public Method Summary

|---|---|
| boolean | [add](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#add(K))(K e) Adds the specified key to this set view by mapping the key to the default mapped value in the backing map, if defined. |
| boolean | [addAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#addAll(java.util.Collection<?%20extends%20K>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<? extends K\> c) Adds all of the elements in the specified collection to this set, as if by calling `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#add(E)` on each one. |
| final void | [clear](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#clear())() Removes all of the elements from this view, by removing all the mappings from the map backing this view. |
| boolean | [contains](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#contains(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Returns true if this collection contains the specified element. |
| final boolean | [containsAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#containsAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Returns true if this collection contains all of the elements in the specified collection. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Compares this instance with the specified object and indicates if they are equal. |
| void | [forEach](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#forEach(java.util.function.Consumer<?%20super%20K>))([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? super K\> action) |
| [ConcurrentHashMap](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.html)\<K, V\> | [getMap](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#getMap())() Returns the map backing this view. |
| V | [getMappedValue](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#getMappedValue())() Returns the default mapped value for additions, or `null` if additions are not supported. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#hashCode())() Returns an integer hash code for this object. |
| final boolean | [isEmpty](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#isEmpty())() Returns true if this collection contains no elements. |
| [Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)\<K\> | [iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#iterator())() Returns an iterator over the elements in this collection. |
| boolean | [remove](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#remove(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Removes the key from this map view, by removing the key (and its corresponding value) from the backing map. |
| final boolean | [removeAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#removeAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Removes all of this collection's elements that are also contained in the specified collection (optional operation). |
| final boolean | [retainAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#retainAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Retains only the elements in this collection that are contained in the specified collection (optional operation). |
| final int | [size](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#size())() Returns the number of elements in this collection. |
| [Spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html)\<K\> | [spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#spliterator())() Creates a `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html` over the elements in this collection. |
| final \<T\> T\[\] | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#toArray(T[]))(T\[\] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
| final [Object\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#toArray())() Returns an array containing all of the elements in this collection. |
| final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.KeySetView.html#toString())() Returns a string representation of this collection. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [java.util.Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)

|---|---|
| abstract boolean | [add](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#add(E))(K e) Ensures that this collection contains the specified element (optional operation). |
| abstract boolean | [addAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#addAll(java.util.Collection<?%20extends%20E>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<? extends E\> c) Adds all of the elements in the specified collection to this collection (optional operation). |
| abstract void | [clear](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#clear())() Removes all of the elements from this collection (optional operation). |
| abstract boolean | [contains](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#contains(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Returns true if this collection contains the specified element. |
| abstract boolean | [containsAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#containsAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Returns true if this collection contains all of the elements in the specified collection. |
| abstract boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Compares the specified object with this collection for equality. |
| abstract int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#hashCode())() Returns the hash code value for this collection. |
| abstract boolean | [isEmpty](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#isEmpty())() Returns true if this collection contains no elements. |
| abstract [Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)\<K\> | [iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#iterator())() Returns an iterator over the elements in this collection. |
| [Stream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/stream/Stream.html)\<K\> | [parallelStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#parallelStream())() Returns a possibly parallel `Stream` with this collection as its source. |
| abstract boolean | [remove](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#remove(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Removes a single instance of the specified element from this collection, if it is present (optional operation). |
| abstract boolean | [removeAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#removeAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Removes all of this collection's elements that are also contained in the specified collection (optional operation). |
| boolean | [removeIf](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#removeIf(java.util.function.Predicate<?%20super%20E>))([Predicate](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Predicate.html)\<? super E\> filter) Removes all of the elements of this collection that satisfy the given predicate. |
| abstract boolean | [retainAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#retainAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Retains only the elements in this collection that are contained in the specified collection (optional operation). |
| abstract int | [size](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#size())() Returns the number of elements in this collection. |
| [Spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html)\<K\> | [spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#spliterator())() Creates a `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html` over the elements in this collection. |
| [Stream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/stream/Stream.html)\<K\> | [stream](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#stream())() Returns a sequential `Stream` with this collection as its source. |
| abstract \<T\> T\[\] | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#toArray(T[]))(T\[\] a) Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
| abstract [Object\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#toArray())() Returns an array containing all of the elements in this collection. |

From interface [java.util.Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)

|---|---|
| abstract boolean | [add](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#add(E))(K e) Adds the specified element to this set if it is not already present (optional operation). |
| abstract boolean | [addAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#addAll(java.util.Collection<?%20extends%20E>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<? extends E\> c) Adds all of the elements in the specified collection to this set if they're not already present (optional operation). |
| abstract void | [clear](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#clear())() Removes all of the elements from this set (optional operation). |
| abstract boolean | [contains](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#contains(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Returns `true` if this set contains the specified element. |
| abstract boolean | [containsAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#containsAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Returns `true` if this set contains all of the elements of the specified collection. |
| abstract boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Compares the specified object with this set for equality. |
| abstract int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#hashCode())() Returns the hash code value for this set. |
| abstract boolean | [isEmpty](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#isEmpty())() Returns `true` if this set contains no elements. |
| abstract [Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)\<K\> | [iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#iterator())() Returns an iterator over the elements in this set. |
| abstract boolean | [remove](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#remove(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o) Removes the specified element from this set if it is present (optional operation). |
| abstract boolean | [removeAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#removeAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Removes from this set all of its elements that are contained in the specified collection (optional operation). |
| abstract boolean | [retainAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#retainAll(java.util.Collection<?>))([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c) Retains only the elements in this set that are contained in the specified collection (optional operation). |
| abstract int | [size](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#size())() Returns the number of elements in this set (its cardinality). |
| [Spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html)\<K\> | [spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#spliterator())() Creates a `Spliterator` over the elements in this set. |
| abstract \<T\> T\[\] | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#toArray(T[]))(T\[\] a) Returns an array containing all of the elements in this set; the runtime type of the returned array is that of the specified array. |
| abstract [Object\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [toArray](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#toArray())() Returns an array containing all of the elements in this set. |

From interface [java.lang.Iterable](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Iterable.html)

|---|---|
| void | [forEach](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Iterable.html#forEach(java.util.function.Consumer<?%20super%20T>))([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? super T\> action) Performs the given action for each element of the `Iterable` until all elements have been processed or the action throws an exception. |
| abstract [Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)\<K\> | [iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Iterable.html#iterator())() Returns an iterator over elements of type `T`. |
| [Spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html)\<K\> | [spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Iterable.html#spliterator())() Creates a `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html` over the elements described by this `Iterable`. |

## Public Methods

#### public boolean
**add**
(K e)

Adds the specified key to this set view by mapping the key to
the default mapped value in the backing map, if defined.

##### Parameters

| e | key to be added |
|---|---|

##### Returns

- `true` if this set changed as a result of the call

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the specified key is null |
| [UnsupportedOperationException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/UnsupportedOperationException.html) | if no default mapped value for additions was provided |
|---|---|

#### public boolean
**addAll**
([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<? extends K\> c)

Adds all of the elements in the specified collection to this set,
as if by calling `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html#add(E)` on each one.

##### Parameters

| c | the elements to be inserted into this set |
|---|---|

##### Returns

- `true` if this set changed as a result of the call

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the collection or any of its elements are `null` |
| [UnsupportedOperationException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/UnsupportedOperationException.html) | if no default mapped value for additions was provided |
|---|---|

#### public final void
**clear**
()

Removes all of the elements from this view, by removing all
the mappings from the map backing this view.

#### public boolean
**contains**
([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o)

Returns true if this collection contains the specified element.
More formally, returns true if and only if this collection
contains at least one element e such that
(o==null ? e==null : o.equals(e)).

##### Parameters

| o | element whose presence in this collection is to be tested |
|---|---|

##### Returns

- true if this collection contains the specified element

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the specified key is null |
|---|---|

#### public final boolean
**containsAll**
([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c)

Returns true if this collection contains all of the elements
in the specified collection.

##### Parameters

| c | collection to be checked for containment in this collection |
|---|---|

##### Returns

- true if this collection contains all of the elements in the specified collection

#### public boolean
**equals**
([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o)

Compares this instance with the specified object and indicates if they
are equal. In order to be equal, `o` must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.

The default implementation returns `true` only if `this ==
o`. See [Writing a correct
`equals` method](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#writing_equals)
if you intend implementing your own `equals` method.

The general contract for the `equals` and `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode()` methods is that if `equals` returns `true` for
any two objects, then `hashCode()` must return the same value for
these objects. This means that subclasses of `Object` usually
override either both methods or neither of them.

##### Parameters

| o | the object to compare this instance with. |
|---|---|

##### Returns

- `true` if the specified object is equal to this `Object`; `false` otherwise.

#### public void
**forEach**
([Consumer](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/function/Consumer.html)\<? super K\> action)

<br />

##### Parameters

| action |   |
|---|---|

#### public [ConcurrentHashMap](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/ConcurrentHashMap.html)\<K, V\>
**getMap**
()

Returns the map backing this view.

##### Returns

- the map backing this view

#### public V
**getMappedValue**
()

Returns the default mapped value for additions,
or `null` if additions are not supported.

##### Returns

- the default mapped value for additions, or `null` if not supported

#### public int
**hashCode**
()

Returns an integer hash code for this object. By contract, any two
objects for which `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object)` returns `true` must return
the same hash code value. This means that subclasses of `Object`
usually override both methods or neither method.

Note that hash values must not change over time unless information used in equals
comparisons also changes.

See [Writing a correct
`hashCode` method](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#writing_hashCode)
if you intend implementing your own `hashCode` method.

##### Returns

- this object's hash code.

#### public final boolean
**isEmpty**
()

Returns true if this collection contains no elements.

##### Returns

- true if this collection contains no elements

#### public [Iterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Iterator.html)\<K\>
**iterator**
()

Returns an iterator over the elements in this collection.

The returned iterator is
[*weakly consistent*](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/package-summary#Weakly).

##### Returns

- an iterator over the keys of the backing map

#### public boolean
**remove**
([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) o)

Removes the key from this map view, by removing the key (and its
corresponding value) from the backing map. This method does
nothing if the key is not in the map.

##### Parameters

| o | the key to be removed from the backing map |
|---|---|

##### Returns

- `true` if the backing map contained the specified key

##### Throws

| [NullPointerException](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/NullPointerException.html) | if the specified key is null |
|---|---|

#### public final boolean
**removeAll**
([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c)

Removes all of this collection's elements that are also contained in the
specified collection (optional operation). After this call returns,
this collection will contain no elements in common with the specified
collection.

##### Parameters

| c | collection containing elements to be removed from this collection |
|---|---|

##### Returns

- true if this collection changed as a result of the call

#### public final boolean
**retainAll**
([Collection](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html)\<?\> c)

Retains only the elements in this collection that are contained in the
specified collection (optional operation). In other words, removes from
this collection all of its elements that are not contained in the
specified collection.

##### Parameters

| c | collection containing elements to be retained in this collection |
|---|---|

##### Returns

- true if this collection changed as a result of the call

#### public final int
**size**
()

Returns the number of elements in this collection. If this collection
contains more than Integer.MAX_VALUE elements, returns
Integer.MAX_VALUE.

##### Returns

- the number of elements in this collection

#### public [Spliterator](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html)\<K\>
**spliterator**
()

Creates a `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html` over the elements in this collection.

Implementations should document characteristic values reported by the
spliterator. Such characteristic values are not required to be reported
if the spliterator reports `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Spliterator.html#SIZED` and this collection
contains no elements.

The default implementation should be overridden by subclasses that
can return a more efficient spliterator. In order to
preserve expected laziness behavior for the `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#stream()` and
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#parallelStream()`} methods, spliterators should either have the
characteristic of `IMMUTABLE` or `CONCURRENT`, or be
*[late-binding](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/concurrent/Spliterator#binding)* .
If none of these is practical, the overriding class should describe the
spliterator's documented policy of binding and structural interference,
and should override the `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#stream()` and `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#parallelStream()`
methods to create streams using a `Supplier` of the spliterator,
as in:

    Stream<E> s = StreamSupport.stream(() -> spliterator(), spliteratorCharacteristics)
     
These requirements ensure that streams produced by the
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#stream()` and `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#parallelStream()` methods will reflect the
contents of the collection as of initiation of the terminal stream
operation.

##### Returns

- a `Spliterator` over the elements in this collection

#### public final T\[\]
**toArray**
(T\[\] a)

Returns an array containing all of the elements in this collection;
the runtime type of the returned array is that of the specified array.
If the collection fits in the specified array, it is returned therein.
Otherwise, a new array is allocated with the runtime type of the
specified array and the size of this collection.

If this collection fits in the specified array with room to spare
(i.e., the array has more elements than this collection), the element
in the array immediately following the end of the collection is set to
null. (This is useful in determining the length of this
collection *only* if the caller knows that this collection does
not contain any null elements.)

If this collection makes any guarantees as to what order its elements
are returned by its iterator, this method must return the elements in
the same order.

Like the `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Collection.html#toArray()` method, this method acts as bridge between
array-based and collection-based APIs. Further, this method allows
precise control over the runtime type of the output array, and may,
under certain circumstances, be used to save allocation costs.

Suppose x is a collection known to contain only strings.
The following code can be used to dump the collection into a newly
allocated array of String:

```
     String[] y = x.toArray(new String[0]);
```
Note that toArray(new Object\[0\]) is identical in function to toArray().

<br />

##### Parameters

| a | the array into which the elements of this collection are to be stored, if it is big enough; otherwise, a new array of the same runtime type is allocated for this purpose. |
|---|---|

##### Returns

- an array containing all of the elements in this collection

#### public final [Object\[\]](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)
**toArray**
()

Returns an array containing all of the elements in this collection.
If this collection makes any guarantees as to what order its elements
are returned by its iterator, this method must return the elements in
the same order.

The returned array will be "safe" in that no references to it are
maintained by this collection. (In other words, this method must
allocate a new array even if this collection is backed by an array).
The caller is thus free to modify the returned array.

This method acts as bridge between array-based and collection-based
APIs.

##### Returns

- an array containing all of the elements in this collection

#### public final [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**toString**
()

Returns a string representation of this collection.
The string representation consists of the string representations
of the collection's elements in the order they are returned by
its iterator, enclosed in square brackets (`"[]"`).
Adjacent elements are separated by the characters `", "`
(comma and space). Elements are converted to strings as by
`https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html#valueOf(java.lang.Object)`.

##### Returns

- a string representation of this collection