replace method

void replace(
  1. T item
)

Updates the value of item.

This only works when the ids of the new and old value are identical.

Implementation

void replace(T item) {
  _items[_getIndex(item)] = item;
}