List of usage examples for com.google.common.primitives Longs hashCode
public static int hashCode(long value)
From source file:org.gradle.cache.internal.btree.BlockPointer.java
@Override public int hashCode() { return Longs.hashCode(pos); }
From source file:com.cloudera.oryx.rdf.common.tree.TreePath.java
@Override public int hashCode() { return Longs.hashCode(leftRight) ^ pathLength; }
From source file:com.torodb.mongowp.bson.abst.AbstractBsonInt64.java
@Override public final int hashCode() { return Longs.hashCode(longValue()); }
From source file:com.facebook.presto.operator.HashStrategyUtils.java
public static int valueHashCode(Type type, Slice slice, int offset) { boolean isNull = slice.getByte(offset) != 0; if (isNull) { return 0; }/*from ww w . j av a 2 s .co m*/ if (type == Type.FIXED_INT_64) { return Longs.hashCode(slice.getLong(offset + SIZE_OF_BYTE)); } else if (type == Type.DOUBLE) { long longValue = Double.doubleToLongBits(slice.getDouble(offset + SIZE_OF_BYTE)); return Longs.hashCode(longValue); } else if (type == Type.BOOLEAN) { return slice.getByte(offset + SIZE_OF_BYTE) != 0 ? 1 : 0; } else if (type == Type.VARIABLE_BINARY) { int sliceLength = getVariableBinaryLength(slice, offset); return slice.hashCode(offset, sliceLength); } else { throw new IllegalArgumentException("Unsupported type " + type); } }
From source file:org.codelibs.elasticsearch.taste.common.LongPair.java
@Override public int hashCode() { final int firstHash = Longs.hashCode(first); // Flip top and bottom 16 bits; this makes the hash function probably different // for (a,b) versus (b,a) return (firstHash >>> 16 | firstHash << 16) ^ Longs.hashCode(second); }
From source file:com.cloudera.oryx.als.computation.types.MatrixRow.java
@Override public int hashCode() { return Longs.hashCode(rowId) ^ Arrays.hashCode(values); }
From source file:com.torodb.torod.core.subdocument.values.ScalarLong.java
@Override public int hashCode() { return Longs.hashCode(longValue()); }
From source file:org.midonet.odp.flows.FlowStats.java
@Override public int hashCode() { return 31 * Longs.hashCode(packets) + Longs.hashCode(bytes); }
From source file:org.apache.mahout.cf.taste.hadoop.EntityEntityWritable.java
@Override public int hashCode() { return Longs.hashCode(aID) + 31 * Longs.hashCode(bID); }
From source file:org.apache.mahout.graph.model.Vertex.java
/** * The hash code the {@code id} attribute */ @Override public int hashCode() { return Longs.hashCode(id); }