Example usage for com.google.common.hash HashFunction bits

List of usage examples for com.google.common.hash HashFunction bits

Introduction

In this page you can find the example usage for com.google.common.hash HashFunction bits.

Prototype

int bits();

Source Link

Document

Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.

Usage

From source file:com.eventsourcing.index.AbstractHashingAttributeIndex.java

/**
 * Protected constructor, called by subclasses.
 *
 * @param attribute        The attribute on which the index will be built
 * @param supportedQueries The set of {@link Query} types which the subclass implementation supports
 * @param hashFunction/*from w  w w . j a  v a  2 s.  c  o m*/
 */
protected AbstractHashingAttributeIndex(Attribute<O, A> attribute, Set<Class<? extends Query>> supportedQueries,
        HashFunction hashFunction) {
    super(attribute, supportedQueries);
    this.hashFunction = hashFunction;
    hashSize = hashFunction.bits() / 8;
}