operator [] method

V? operator [](
  1. K key
)

Lookup that also bumps the entry to MRU.

Nullable V types with a stored null are a hit: bumped and returned.

Implementation

V? operator [](K key) {
  final node = _nodes[key];
  if (node == null) return null;
  _moveToNewest(node);
  return node.value;
}