public void Find(SearchQuery <V> query) { KeyedSearchQuery <K, V> keyedQuery = (KeyedSearchQuery <K, V>)query; int index = _function.Hash(keyedQuery.SearchKey()); _storage.Find(index, keyedQuery); }
public override void Find(int index, KeyedSearchQuery <K, V> keyedQuery) { for (int i = 0; i < _array.Length; i++) { int realIndex = (index + i * _mainFunction.Hash(keyedQuery.SearchKey())) % _array.Length; if (_array[realIndex] == null) { keyedQuery.Count(); return; } if (keyedQuery.Check(_array[realIndex]) == 0 && !_deleted[realIndex]) { return; } } }