# MutableIntObjectMap

Artifact: [androidx.collection:collection](https://developer.android.com/jetpack/androidx/releases/collection) [View Source](https://cs.android.com/search?q=file:androidx/collection/IntObjectMap.kt+class:androidx.collection.MutableIntObjectMap) Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

*** ** * ** ***

Common/AllAndroid/JVMNative/C/iOSJavaScript
- Cmn

  ```
  class MutableIntObjectMap<V : Any?> : IntObjectMap<V>
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.collection.IntObjectMap](https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap)\<V\> ||
|   | ↳ | [androidx.collection.MutableIntObjectMap](https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap) |

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap` is a container with a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html`-like interface for keys with `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` primitives and reference type values.

The underlying implementation is designed to avoid allocations from boxing, and insertion, removal, retrieval, and iteration operations. Allocations may still happen on insertion when the underlying storage needs to grow to accommodate newly added entries to the table. In addition, this implementation minimizes memory usage by avoiding the use of separate objects to hold key/value pairs.

This implementation makes no guarantee as to the order of the keys and values stored, nor does it make guarantees that the order remains constant over time.

This implementation is not thread-safe: if multiple threads access this container concurrently, and one or more threads modify the structure of the map (insertion or removal for instance), the calling code must provide the appropriate synchronization. Multiple threads are safe to read from this map concurrently if no write is happening.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/collection/ScatterMap` |   |

## Summary

| ### Public constructors |
|---|---|
| `<V : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#MutableIntObjectMap(kotlin.Int)(initialCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a new `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#clear()()` Removes all mappings from this map. | Cmn |
| `inline V` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#getOrPut(kotlin.Int,kotlin.Function0)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, defaultValue: () -> V)` Returns the value to which the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#getOrPut(kotlin.Int,kotlin.Function0)` is mapped, if the value is present in the map and not `null`. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.Int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.Int)` and its associated value from the map. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.IntArray)(keys: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int-array/index.html)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.IntArray)` and their associated value from the map. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntList)(keys: https://developer.android.com/reference/kotlin/androidx/collection/IntList)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntList)` and their associated value from the map. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntSet)(keys: https://developer.android.com/reference/kotlin/androidx/collection/IntSet)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntSet)` and their associated value from the map. | Cmn |
| `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#plusAssign(androidx.collection.IntObjectMap)(from: https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap<V>)` Puts all the key/value mappings in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#plusAssign(androidx.collection.IntObjectMap)` map into this map. | Cmn |
| `V?` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: V)` Creates a new mapping from `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` in this map. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#putAll(androidx.collection.IntObjectMap)(from: https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap<V>)` Puts all the key/value mappings in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#putAll(androidx.collection.IntObjectMap)` map into this map. | Cmn |
| `V?` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int)` and its associated value from the map. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: V)` Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int,kotlin.Any)` and its associated value from the map if the associated value equals `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int,kotlin.Any)`. | Cmn |
| `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#removeIf(kotlin.Function2)(predicate: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, V) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Removes any mapping for which the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#removeIf(kotlin.Function2)` returns true. | Cmn |
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value: V)` Creates a new mapping from `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` in this map. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#trim()()` Trims this `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap`'s storage so it is sized appropriately to hold the current mappings. | Cmn |

### Inherited functions

From [androidx.collection.IntObjectMap](https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap) `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#all(kotlin.Function2)(predicate: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, V) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns true if all entries match the given `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#all(kotlin.Function2)`.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#any()()`

Returns `true` if this map has at least one entry.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#any(kotlin.Function2)(predicate: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, V) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns true if at least one entry matches the given `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#any(kotlin.Function2)`.
Cmn `inline operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#contains(kotlin.Int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns true if the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#contains(kotlin.Int)` is present in this map, false otherwise.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#containsKey(kotlin.Int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns true if the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#containsKey(kotlin.Int)` is present in this map, false otherwise.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#containsValue(kotlin.Any)(value: V)`

Returns true if the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#containsValue(kotlin.Any)` is present in this map, false otherwise.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#count()()`

Returns the number of entries in this map.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#count(kotlin.Function2)(predicate: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, V) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Returns the number of entries matching the given `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#count(kotlin.Function2)`.
Cmn `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)`

Compares the specified object `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#equals(kotlin.Any)` with this hash map for equality.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEach(kotlin.Function2)(block: (key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Iterates over every key/value pair stored in this map by invoking the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEach(kotlin.Function2)` lambda.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEachKey(kotlin.Function1)(block: (key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Iterates over every key stored in this map by invoking the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEachKey(kotlin.Function1)` lambda.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEachValue(kotlin.Function1)(block: (value) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)`

Iterates over every value stored in this map by invoking the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#forEachValue(kotlin.Function1)` lambda.
Cmn `operator V?` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#get(kotlin.Int)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

Returns the value corresponding to the given `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#get(kotlin.Int)`, or `null` if such a key is not present in the map.
Cmn `V` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#getOrDefault(kotlin.Int,kotlin.Any)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, defaultValue: V)`

Returns the value to which the specified `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#getOrDefault(kotlin.Int,kotlin.Any)` is mapped, or `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#getOrDefault(kotlin.Int,kotlin.Any)` if this map contains no mapping for the key.
Cmn `inline V` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#getOrElse(kotlin.Int,kotlin.Function0)(key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, defaultValue: () -> V)`

Returns the value for the given `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#getOrElse(kotlin.Int,kotlin.Function0)` if the value is present and not null.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#hashCode()()`

Returns the hash code value for this map.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#isEmpty()()`

Indicates whether this map is empty.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#isNotEmpty()()`

Returns `true` if this map is not empty.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)(
separator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
postfix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
limit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
truncated: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html
)`

Creates a String from the entries, separated by `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` and using `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` before and `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` after, if supplied.
Cmn `inline https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)(
separator: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
prefix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
postfix: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
limit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html,
truncated: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html,
crossinline transform: (key: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, value) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html
)`

Creates a String from the entries, separated by `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` and using `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` before and `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` after, if supplied.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#none()()`

Returns `true` if this map has no entries.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#toString()()`

Returns a string representation of this map.
Cmn

### Inherited properties

From [androidx.collection.IntObjectMap](https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#capacity()`

Returns the number of key-value pairs that can be stored in this map without requiring internal storage reallocation.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` `https://developer.android.com/reference/kotlin/androidx/collection/IntObjectMap#size()`

Returns the number of key-value pairs in this map.
Cmn

## Public constructors

### MutableIntObjectMap

Cmn

```
<V : Any?> MutableIntObjectMap(initialCapacity: Int = DefaultScatterCapacity)
```

Creates a new `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap`

| Parameters |
|---|---|
| `initialCapacity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = DefaultScatterCapacity` | The initial desired capacity for this container. the container will honor this value by guaranteeing its internal structures can hold that many entries without requiring any allocations. The initial capacity can be set to 0. |

## Public functions

### clear

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun clear(): Unit
```

Removes all mappings from this map.

### getOrPut

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline fun getOrPut(key: Int, defaultValue: () -> V): V
```

Returns the value to which the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#getOrPut(kotlin.Int,kotlin.Function0)` is mapped, if the value is present in the map and not `null`. Otherwise, calls `defaultValue()` and puts the result in the map associated with `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#getOrPut(kotlin.Int,kotlin.Function0)`.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun minusAssign(key: Int): Unit
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.Int)` and its associated value from the map.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun minusAssign(keys: IntArray): Unit
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(kotlin.IntArray)` and their associated value from the map.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun minusAssign(keys: IntList): Unit
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntList)` and their associated value from the map.

### minusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun minusAssign(keys: IntSet): Unit
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#minusAssign(androidx.collection.IntSet)` and their associated value from the map.

### plusAssign

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline operator fun plusAssign(from: IntObjectMap<V>): Unit
```

Puts all the key/value mappings in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#plusAssign(androidx.collection.IntObjectMap)` map into this map.

### put

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun put(key: Int, value: V): V?
```

Creates a new mapping from `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` in this map. If `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` is already present in the map, the association is modified and the previously associated value is replaced with `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)`. If `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)` is not present, a new entry is added to the map, which may require to grow the underlying storage and cause allocations. Return the previous value associated with the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#put(kotlin.Int,kotlin.Any)`, or `null` if the key was not present in the map.

### putAll

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun putAll(from: IntObjectMap<V>): Unit
```

Puts all the key/value mappings in the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#putAll(androidx.collection.IntObjectMap)` map into this map.

### remove

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun remove(key: Int): V?
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int)` and its associated value from the map. If the `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int)` was present in the map, this function returns the value that was present before removal.

### remove

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun remove(key: Int, value: V): Boolean
```

Removes the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int,kotlin.Any)` and its associated value from the map if the associated value equals `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#remove(kotlin.Int,kotlin.Any)`. Returns whether the removal happened.

### removeIf

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
inline fun removeIf(predicate: (Int, V) -> Boolean): Unit
```

Removes any mapping for which the specified `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#removeIf(kotlin.Function2)` returns true.

### set

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
operator fun set(key: Int, value: V): Unit
```

Creates a new mapping from `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` to `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` in this map. If `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` is already present in the map, the association is modified and the previously associated value is replaced with `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)`. If `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap#set(kotlin.Int,kotlin.Any)` is not present, a new entry is added to the map, which may require to grow the underlying storage and cause allocations.

### trim

Cmn Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/collection#1.4.0)

```
fun trim(): Int
```

Trims this `https://developer.android.com/reference/kotlin/androidx/collection/MutableIntObjectMap`'s storage so it is sized appropriately to hold the current mappings.

Returns the number of empty entries removed from this map's storage. Returns be 0 if no trimming is necessary or possible.