Interface Hasher
- All Known Implementing Classes:
EnhancedDoubleHasher
public interface Hasher
A Hasher creates IndexExtractor based on the hash implementation and the
provided Shape.
- Since:
- 4.5
-
Method Summary
Modifier and TypeMethodDescriptionCreates an IndexExtractor for this hasher based on the Shape.
-
Method Details
-
indices
Creates an IndexExtractor for this hasher based on the Shape.The
IndexExtractor
will create indices within the range defined by the number of bits in the shape. The total number of indices will respect the number of hash functions per item defined by the shape. However the count of indices may not be a multiple of the number of hash functions if the implementation has removed duplicates.This IndexExtractor must be deterministic in that it must return the same indices for the same Shape.
No guarantee is made as to order of indices.
Duplicates indices for a single item may be produced.
- Parameters:
shape
- the shape of the desired Bloom filter.- Returns:
- the iterator of integers
-