MutableCounter

interface MutableCounter<T> : MapWithDefault<T, Int> , MutableMapWithDefault<T, Int>

Mutable alternative of Counter, also bringing the convenient addAll method.

Functions

Link copied to clipboard
abstract fun addAll(from: Map<out T, Int>)

Add all occurrences of from keys into this counter.

Link copied to clipboard
abstract fun clear()
Link copied to clipboard
open fun compute(p0: T, p1: BiFunction<in T, in Int?, out Int?>): Int?
Link copied to clipboard
open fun computeIfAbsent(p0: T, p1: Function<in T, out Int>): Int
Link copied to clipboard
open fun computeIfPresent(p0: T, p1: BiFunction<in T, in Int, out Int?>): Int?
Link copied to clipboard
abstract fun containsKey(key: T): Boolean
Link copied to clipboard
abstract fun containsValue(value: Int): Boolean
Link copied to clipboard
open fun forEach(p0: BiConsumer<in T, in Int>)
Link copied to clipboard
abstract operator override fun get(key: T): Int
Link copied to clipboard
open fun getOrDefault(key: T, defaultValue: Int): Int
Link copied to clipboard
abstract fun isEmpty(): Boolean
Link copied to clipboard
open fun merge(    p0: T,     p1: Int,     p2: BiFunction<in Int, in Int, out Int?>): Int?
Link copied to clipboard
abstract fun put(key: T, value: Int): Int?
Link copied to clipboard
abstract fun putAll(from: Map<out T, Int>)
Link copied to clipboard
open fun putIfAbsent(p0: T, p1: Int): Int?
Link copied to clipboard
abstract fun remove(key: T): Int?
open fun remove(key: T, value: Int): Boolean
Link copied to clipboard
open fun replace(p0: T, p1: Int): Int?
open fun replace(    p0: T,     p1: Int,     p2: Int): Boolean
Link copied to clipboard
open fun replaceAll(p0: BiFunction<in T, in Int, out Int>)

Properties

Link copied to clipboard
abstract val entries: Set<Map.Entry<T, Int>>
Link copied to clipboard
abstract val keys: Set<T>
Link copied to clipboard
abstract val size: Int
Link copied to clipboard
abstract val values: Collection<Int>