public void Erase(T id) { int pos = _locator.Get(id); Swap(pos, _ids.Count - 1); T outOfPlaceId = _ids[pos]; _ids.RemoveAt(_ids.Count - 1); _locator.Remove(id); if (!Empty && !Equals(outOfPlaceId, id)) { TrinkleUp(_locator.Get(outOfPlaceId)); TrinkleDown(_locator.Get(outOfPlaceId)); } }