lookup method
- KeyType key
Finds key and returns its physical index and reference count.
Implementation
({int index, int referenceCount})? lookup(KeyType key) {
for (var index = 0; index < capacity; index++) {
final entry = _entries[index];
if (entry?.key == key) {
return (index: index, referenceCount: entry!.referenceCount);
}
}
return null;
}