mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
fix bloom-filter.md
This commit is contained in:
parent
d0e70fcbbb
commit
a23d452ba7
@ -148,7 +148,7 @@ public class MyBloomFilter {
|
|||||||
*/
|
*/
|
||||||
public int hash(Object value) {
|
public int hash(Object value) {
|
||||||
int h;
|
int h;
|
||||||
return (value == null) ? 0 : Math.abs(seed * (cap - 1) & ((h = value.hashCode()) ^ (h >>> 16)));
|
return (value == null) ? 0 : Math.abs((cap - 1) & seed * ((h = value.hashCode()) ^ (h >>> 16)));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user