decrementHash method
Decrements the count for hash
.
Implementation
int decrementHash(int hash) {
if (hashes.containsKey(hash)) {
hashes[hash] = hashes[hash]! - 1;
int hits = hashes[hash]!;
if (hashes[hash]! < 1) {
hashes.remove(hash);
hits = 0;
}
return hits;
} else {
return 0;
}
}