Class CountingBloomFilter.Builder<T>
java.lang.Object
cloud.opencode.base.hash.bloom.CountingBloomFilter.Builder<T>
- Type Parameters:
T- element type | 元素类型
- Enclosing class:
CountingBloomFilter<T>
Builder for counting bloom filter
计数布隆过滤器构建器
- Since:
- JDK 25, opencode-base-hash V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the counting bloom filter 构建计数布隆过滤器counterBits(int bits) Sets the counter bits (default 4) 设置计数器位数(默认4)expectedInsertions(long expectedInsertions) Sets the expected insertions 设置预期插入量fpp(double fpp) Sets the false positive probability 设置误判率hashFunction(HashFunction hashFunction) Sets the hash function 设置哈希函数
-
Constructor Details
-
Builder
-
-
Method Details
-
expectedInsertions
Sets the expected insertions 设置预期插入量- Parameters:
expectedInsertions- expected insertions | 预期插入量- Returns:
- this builder | 此构建器
-
fpp
Sets the false positive probability 设置误判率- Parameters:
fpp- false positive probability | 误判率- Returns:
- this builder | 此构建器
-
counterBits
Sets the counter bits (default 4) 设置计数器位数(默认4)- Parameters:
bits- counter bits | 计数器位数- Returns:
- this builder | 此构建器
-
hashFunction
Sets the hash function 设置哈希函数- Parameters:
hashFunction- hash function | 哈希函数- Returns:
- this builder | 此构建器
-
build
Builds the counting bloom filter 构建计数布隆过滤器- Returns:
- counting bloom filter | 计数布隆过滤器
-