Example usage for com.google.common.primitives Longs hashCode

List of usage examples for com.google.common.primitives Longs hashCode

Introduction

In this page you can find the example usage for com.google.common.primitives Longs hashCode.

Prototype

public static int hashCode(long value) 

Source Link

Document

Returns a hash code for value ; equal to the result of invoking ((Long) value).hashCode() .

Usage

From source file:com.cloudera.oryx.common.stats.IntegerWeightedMean.java

@Override
public int hashCode() {
    return Longs.hashCode(count) ^ Longs.hashCode(totalWeight) ^ LangUtils.hashDouble(mean);
}

From source file:net.derquinse.common.base.LongWaterMark.java

public int hashCode() {
    return ((527 + Longs.hashCode(current)) * 31 + Longs.hashCode(min)) * 31 + Longs.hashCode(max);
}

From source file:net.slashies.phpBridge.AbstractLongMap.java

/**
 * Hash code implementation that is compatible with that of a <code>Map&lt;Long, V&gt;</code> and avoids boxing
 *///from w w w.  jav  a  2 s .co  m
@SuppressWarnings("rawtypes")
@Override
public int hashCode() {
    int c = 0;
    for (LongMap.Entry e : longEntrySet()) {
        c += Longs.hashCode(e.longKey()) ^ (e.getValue() == null ? 0 : e.getValue().hashCode());
    }
    return c;
}

From source file:org.elasticsearch.common.util.SlicedLongList.java

@Override
public int hashCode() {
    int result = 1;
    for (int i = 0; i < length; i++) {
        result = 31 * result + Longs.hashCode(values[offset + i]);
    }// w ww .  ja  v a 2  s  . com
    return result;
}

From source file:org.apache.mahout.fpm.pfpgrowth.fpgrowth.Pattern.java

@Override
public int hashCode() {
    if (!dirty) {
        return hashCode;
    }//www. j  a  v a2s .  c om
    int result = Arrays.hashCode(pattern);
    result = 31 * result + Longs.hashCode(support);
    result = 31 * result + length;
    hashCode = result;
    return result;
}

From source file:org.elasticsearch.index.fielddata.util.LongArrayRef.java

@Override
public int hashCode() {
    int result = 1;
    for (int i = start; i < end; i++) {
        result = 31 * result + Longs.hashCode(values[i]);
    }/*  w w  w .  j  a v a  2 s. com*/
    return result;
}

From source file:com.cinchapi.concourse.server.model.PrimaryKey.java

@Override
public int hashCode() {
    return Longs.hashCode(data);
}

From source file:org.sosy_lab.cpachecker.util.states.MemoryLocation.java

@Override
public int hashCode() {

    int hc = 17;//from w  w  w.j  av  a2s.  c o  m
    int hashMultiplier = 59;

    hc = hc * hashMultiplier + Objects.hashCode(functionName);
    hc = hc * hashMultiplier + identifier.hashCode();
    hc = hc * hashMultiplier + Longs.hashCode(offset);

    return hc;
}

From source file:org.midonet.odp.flows.FlowKeyTunnel.java

@Override
public int hashCode() {
    int hashCode = Longs.hashCode(tun_id);
    hashCode = 31 * hashCode + ipv4_src;
    hashCode = 31 * hashCode + ipv4_dst;
    hashCode = 31 * hashCode + tun_flags;
    hashCode = 31 * hashCode + ipv4_tos;
    hashCode = 31 * hashCode + ipv4_ttl;
    return hashCode;
}

From source file:org.apache.tajo.datum.TimeDatum.java

@Override
public int hashCode() {
    return Longs.hashCode(time);
}