put method
V?
put(
- K key,
- V value
Inserts (or replaces) value
at key
in this database.
The previous value for key
, if any, is returned. If there was no
previous value -- that is, if this is an INSERT rather than an UPDATE --
then the return value is null
.
Implementation
V? put(K key, V value) {
var oldValue = _map[key];
_map[key] = value;
_streamController.add(Tuple2<K, V?>(key, value));
return oldValue;
}