mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
package cn.hutool.bloomfilter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.util.BitSet;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.HashUtil;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.util.BitSet;
|
||||
|
||||
/**
|
||||
* BloomFilter实现方式2,此方式使用BitSet存储。<br>
|
||||
* Hash算法的使用使用固定顺序,只需指定个数即可
|
||||
@@ -17,10 +17,10 @@ import cn.hutool.core.util.HashUtil;
|
||||
public class BitSetBloomFilter implements BloomFilter{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private BitSet bitSet;
|
||||
private int bitSetSize;
|
||||
private int addedElements;
|
||||
private int hashFunctionNumber;
|
||||
private final BitSet bitSet;
|
||||
private final int bitSetSize;
|
||||
private final int addedElements;
|
||||
private final int hashFunctionNumber;
|
||||
|
||||
/**
|
||||
* 构造一个布隆过滤器,过滤器的容量为c * n 个bit.
|
||||
|
Reference in New Issue
Block a user