Examples of nextSlice()


Examples of com.google.common.hash.HashCodes.HashCodeSlicer.nextSlice()

   */
  public boolean mightContain(T instance) {
    HashCodeSlicer slicer = HashCodes.slice(
        hashFunction.newHasher().putObject(instance, funnel).hash(), hashBitsPerSlice);
    for (int i = 0; i < numHashFunctions; i++) {
      if (!bits.get(slicer.nextSlice())) {
        return false;
      }
    }
    return true;
  }
View Full Code Here

Examples of com.google.common.hash.HashCodes.HashCodeSlicer.nextSlice()

   */
  public void put(T instance) {
    HashCodeSlicer slicer = HashCodes.slice(
        hashFunction.newHasher().putObject(instance, funnel).hash(), hashBitsPerSlice);
    for (int i = 0; i < numHashFunctions; i++) {
      int nextSlice = slicer.nextSlice();
      bits.set(nextSlice);
    }
  }
 
  @VisibleForTesting int getHashCount() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.