Package-level declarations
Functions
Link copied to clipboard
Removes all elements in a collection and transforms them, leaving out any that are transformed to null
.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <K, V> MutableMap<K, V>.mutateValues(transform: (entry: Map.Entry<K, V>) -> V): MutableMap<K, V>
inline fun <K, V> MutableMap<K, V>.mutateValues(transform: (key: K, value: V) -> V): MutableMap<K, V>
Applies transform to each entry in the map, reusing the same structure to keep them.
Link copied to clipboard
inline fun <K, V> MutableMap<K, V>.mutateValuesNotNull(transform: (entry: Map.Entry<K, V>) -> V?): MutableMap<K, V>
inline fun <K, V> MutableMap<K, V>.mutateValuesNotNull(transform: (key: K, value: V) -> V?): MutableMap<K, V>
Applies transform to each entry in the map, removing the item if null
is returned.
Link copied to clipboard
Removes any items in the list that are not type A and returns a MutableCollection<A> with the remaining items.
Removes any items in the list that are not type A and returns a MutableList<A> with the remaining items.
Removes any items in the list that are not type A and returns a MutableSet<A> with the remaining items.
Link copied to clipboard
Removes any values in the map that are not type V and returns a MutableMap<K, V> with the remaining entries.