# MutableIntFloatMap

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

*** ** * ** ***


```
public final class MutableIntFloatMap extends IntFloatMap
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.collection.IntFloatMap](https://developer.android.com/reference/androidx/collection/IntFloatMap) ||
|   | ↳ | [androidx.collection.MutableIntFloatMap](https://developer.android.com/reference/androidx/collection/MutableIntFloatMap) |

*** ** * ** ***

`https://developer.android.com/reference/androidx/collection/MutableIntFloatMap` is a container with a `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html`-like interface for `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` primitive keys and `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` primitive 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/androidx/collection/MutableScatterMap` |   |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#MutableIntFloatMap(kotlin.Int)(int initialCapacity)` Creates a new `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap` |

| ### Public methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#clear()()` Removes all mappings from this map. |
| `final float` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#getOrPut(kotlin.Int,kotlin.Function0)(int key, @https://developer.android.com/reference/androidx/annotation/NonNull Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html> defaultValue)` Returns the value to which the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#getOrPut(kotlin.Int,kotlin.Function0)` is mapped, if the value is present in the map and not `null`. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(kotlin.Int)(int key)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(kotlin.Int)` and its associated value from the map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(kotlin.IntArray)(@https://developer.android.com/reference/androidx/annotation/NonNull int[] keys)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(kotlin.IntArray)` and their associated value from the map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(androidx.collection.IntList)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntList keys)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(androidx.collection.IntList)` and their associated value from the map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(androidx.collection.IntSet)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntSet keys)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#minusAssign(androidx.collection.IntSet)` and their associated value from the map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#plusAssign(androidx.collection.IntFloatMap)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntFloatMap from)` Puts all the key/value mappings in the `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#plusAssign(androidx.collection.IntFloatMap)` map into this map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)(int key, float value)` Creates a new mapping from `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` to `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` in this map. |
| `final float` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float,kotlin.Float)(int key, float value, float default)` Creates a new mapping from `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float,kotlin.Float)` to `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float,kotlin.Float)` in this map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#putAll(androidx.collection.IntFloatMap)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/collection/IntFloatMap from)` Puts all the key/value mappings in the `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#putAll(androidx.collection.IntFloatMap)` map into this map. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#remove(kotlin.Int)(int key)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#remove(kotlin.Int)` and its associated value from the map. |
| `final boolean` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#remove(kotlin.Int,kotlin.Float)(int key, float value)` Removes the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#remove(kotlin.Int,kotlin.Float)` and its associated value from the map if the associated value equals `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#remove(kotlin.Int,kotlin.Float)`. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#removeIf(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Removes any mapping for which the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#removeIf(kotlin.Function2)` returns true. |
| `final void` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#set(kotlin.Int,kotlin.Float)(int key, float value)` Creates a new mapping from `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#set(kotlin.Int,kotlin.Float)` to `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#set(kotlin.Int,kotlin.Float)` in this map. |
| `final int` | `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#trim()()` Trims this `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap`'s storage so it is sized appropriately to hold the current mappings. |

| ### Inherited methods |
|---|
| From [androidx.collection.IntFloatMap](https://developer.android.com/reference/androidx/collection/IntFloatMap) |---|---| | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#all(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns true if all entries match the given `https://developer.android.com/reference/androidx/collection/IntFloatMap#all(kotlin.Function2)`. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#any()()` Returns `true` if this map has at least one entry. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#any(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns true if at least one entry matches the given `https://developer.android.com/reference/androidx/collection/IntFloatMap#any(kotlin.Function2)`. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#contains(kotlin.Int)(int key)` Returns true if the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#contains(kotlin.Int)` is present in this map, false otherwise. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#containsKey(kotlin.Int)(int key)` Returns true if the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#containsKey(kotlin.Int)` is present in this map, false otherwise. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#containsValue(kotlin.Float)(float value)` Returns true if the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#containsValue(kotlin.Float)` is present in this map, false otherwise. | | `final int` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#count()()` Returns the number of entries in this map. | | `final int` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#count(kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Boolean.html> predicate )` Returns the number of entries matching the given `https://developer.android.com/reference/androidx/collection/IntFloatMap#count(kotlin.Function2)`. | | `boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` Compares the specified object `https://developer.android.com/reference/androidx/collection/IntFloatMap#equals(kotlin.Any)` with this hash map for equality. | | `final void` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEach(kotlin.Function2)(@https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block)` Iterates over every key/value pair stored in this map by invoking the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEach(kotlin.Function2)` lambda. | | `final void` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEachKey(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block)` Iterates over every key stored in this map by invoking the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEachKey(kotlin.Function1)` lambda. | | `final void` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEachValue(kotlin.Function1)(@https://developer.android.com/reference/androidx/annotation/NonNull Function1<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html> block)` Iterates over every value stored in this map by invoking the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#forEachValue(kotlin.Function1)` lambda. | | `final float` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#get(kotlin.Int)(int key)` Returns the value corresponding to the given `https://developer.android.com/reference/androidx/collection/IntFloatMap#get(kotlin.Int)`. | | `final int` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#getCapacity()()` Returns the number of key-value pairs that can be stored in this map without requiring internal storage reallocation. | | `final float` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#getOrDefault(kotlin.Int,kotlin.Float)(int key, float defaultValue)` Returns the value to which the specified `https://developer.android.com/reference/androidx/collection/IntFloatMap#getOrDefault(kotlin.Int,kotlin.Float)` is mapped, or `https://developer.android.com/reference/androidx/collection/IntFloatMap#getOrDefault(kotlin.Int,kotlin.Float)` if this map contains no mapping for the key. | | `final float` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#getOrElse(kotlin.Int,kotlin.Function0)(int key, @https://developer.android.com/reference/androidx/annotation/NonNull Function0<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html> defaultValue)` Returns the value for the given `https://developer.android.com/reference/androidx/collection/IntFloatMap#getOrElse(kotlin.Int,kotlin.Function0)` if the value is present and not null. | | `final int` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#getSize()()` Returns the number of key-value pairs in this map. | | `int` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#hashCode()()` Returns the hash code value for this map. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#isEmpty()()` Indicates whether this map is empty. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#isNotEmpty()()` Returns `true` if this map is not empty. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html separator, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html prefix, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html postfix, int limit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html truncated )` Creates a String from the entries, separated by `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` and using `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` before and `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence)` after, if supplied. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html separator, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html prefix, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html postfix, int limit, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html truncated, @https://developer.android.com/reference/androidx/annotation/NonNull Function2<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Integer.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/Float.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/CharSequence.html> transform )` Creates a String from the entries, separated by `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` and using `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` before and `https://developer.android.com/reference/androidx/collection/IntFloatMap#joinToString(kotlin.CharSequence,kotlin.CharSequence,kotlin.CharSequence,kotlin.Int,kotlin.CharSequence,kotlin.Function2)` after, if supplied. | | `final boolean` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#none()()` Returns `true` if this map has no entries. | | `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/collection/IntFloatMap#toString()()` Returns a string representation of this map. | |

## Public constructors

### MutableIntFloatMap

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

```
public MutableIntFloatMap(int initialCapacity)
```

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

| Parameters |
|---|---|
| `int initialCapacity` | 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 methods

### clear

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

```
public final void clear()
```

Removes all mappings from this map.

### getOrPut

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

```
public final float getOrPut(int key, @NonNull Function0<@NonNull Float> defaultValue)
```

Returns the value to which the specified `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#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/androidx/collection/MutableIntFloatMap#getOrPut(kotlin.Int,kotlin.Function0)`.

### minusAssign

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

```
public final void minusAssign(int key)
```

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

### minusAssign

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

```
public final void minusAssign(@NonNull int[] keys)
```

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

### minusAssign

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

```
public final void minusAssign(@NonNull IntList keys)
```

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

### minusAssign

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

```
public final void minusAssign(@NonNull IntSet keys)
```

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

### plusAssign

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

```
public final void plusAssign(@NonNull IntFloatMap from)
```

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

### put

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

```
public final void put(int key, float value)
```

Creates a new mapping from `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` to `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` in this map. If `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` is already present in the map, the association is modified and the previously associated value is replaced with `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)`. If `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)` 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/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float)`, or `null` if the key was not present in the map.

### put

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

```
public final float put(int key, float value, float default)
```

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

| Returns |
|---|---|
| `float` | value previously associated with `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float,kotlin.Float)` or `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap#put(kotlin.Int,kotlin.Float,kotlin.Float)` if key was not present. |

### putAll

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

```
public final void putAll(@NonNull IntFloatMap from)
```

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

### remove

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

```
public final void remove(int key)
```

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

### remove

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

```
public final boolean remove(int key, float value)
```

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

### removeIf

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

```
public final void removeIf(
    @NonNull Function2<@NonNull Integer, @NonNull Float, @NonNull Boolean> predicate
)
```

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

### set

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

```
public final void set(int key, float value)
```

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

### trim

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

```
public final int trim()
```

Trims this `https://developer.android.com/reference/androidx/collection/MutableIntFloatMap`'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.