contains method

bool contains(
  1. Uint8List key
)

Whether key is present (tombstones count as present).

Implementation

bool contains(Uint8List key) {
  final hash = VxsCrc32c.compute(key);
  var slot = hash & (_slots.length - 1);
  while (true) {
    final entry = _slots[slot];
    if (entry == 0) return false;
    final index = entry - 1;
    if (_hashes[index] == hash &&
        _keyLengths[index] == key.length &&
        _keyEquals(index, key)) {
      return true;
    }
    slot = (slot + 1) & (_slots.length - 1);
  }
}