get method
Returns the value associated with key, or null if not present.
- A
nullkey is not supported and always returnsnull.
Implementation
V? get(Object? key) {
if (key == null) return null;
final objHash = key.hashCode;
final groupIdx = _groupIndex(objHash, _groups.length);
var pos = _groups[groupIdx];
while (pos > 0) {
if (_chainHash[pos] == objHash && key == _chainKey[pos]) {
return _chainVal[pos];
}
pos = _chainNext[pos];
}
return null;
}