public class FuncFilter extends AbstractFilter
BloomFilter
DEFAULT_MACHINE_NUM, size
Constructor and Description |
---|
FuncFilter(long maxValue,
Function<String,Number> hashFunc)
构造
|
FuncFilter(long maxValue,
int machineNum,
Function<String,Number> hashFunc) |
Modifier and Type | Method and Description |
---|---|
long |
hash(String str)
自定义Hash方法
|
add, contains, init
public FuncFilter(long maxValue, Function<String,Number> hashFunc)
maxValue
- 最大值hashFunc
- Hash函数public long hash(String str)
AbstractFilter
hash
in class AbstractFilter
str
- 字符串Copyright © 2024. All rights reserved.