public class BloomFilter extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
add(String value) |
static BloomFilter |
buildBloomFilter(byte[] bytes,
int size,
int hashFunctionSize)
build bloom filter by bytes
|
boolean |
contains(String value) |
boolean |
equals(Object o) |
int |
getBitCount() |
static BloomFilter |
getEmptyBloomFilter(double errorPercent,
int numOfString)
get empty bloom filter
|
int |
getHashFunctionSize() |
int |
getSize() |
int |
hashCode() |
byte[] |
serialize() |
void |
setSize(int size) |
public static BloomFilter getEmptyBloomFilter(double errorPercent, int numOfString)
errorPercent - the tolerant percent of error of the bloom filternumOfString - the number of string want to store in the bloom filterpublic static BloomFilter buildBloomFilter(byte[] bytes, int size, int hashFunctionSize)
bytes - bytes of bitspublic int getHashFunctionSize()
public int getSize()
public void setSize(int size)
public void add(String value)
public boolean contains(String value)
public int getBitCount()
public byte[] serialize()
Copyright © 2022 The Apache Software Foundation. All rights reserved.