incrementBy method

void incrementBy(
  1. K key,
  2. int amount
)

Increments the counter of key by amount.

Implementation

void incrementBy(K key, int amount) => _get(key).count += amount;