Example usage for com.google.common.hash Hasher hashCode

List of usage examples for com.google.common.hash Hasher hashCode

Introduction

In this page you can find the example usage for com.google.common.hash Hasher hashCode.

Prototype

@Override
@Deprecated
int hashCode();

Source Link

Usage

From source file:com.cloudera.oryx.app.classreg.example.Example.java

public Example(Feature target, Feature... features) {
    Preconditions.checkArgument(features != null);
    this.features = features;
    this.target = target;
    Hasher hasher = HASH.newHasher();
    for (Feature feature : features) {
        if (feature != null) {
            hasher.putInt(feature.hashCode());
        }//  ww  w  .jav a  2s . co m
    }
    if (target != null) {
        hasher.putInt(target.hashCode());
    }
    cachedHashCode = hasher.hashCode();
}