put method

void put(
  1. K key,
  2. V value
)

Inserts or replaces a key-value pair.

Implementation

void put(K key, V value) {
  var keyEntry = _createEntry(key, value);
  _map[keyEntry] = keyEntry;
  _onPutEntry(keyEntry, value);
  ++_unpurgedCount;
}