Example usage for java.lang Long hashCode

List of usage examples for java.lang Long hashCode

Introduction

In this page you can find the example usage for java.lang Long hashCode.

Prototype

public static int hashCode(long value) 

Source Link

Document

Returns a hash code for a long value; compatible with Long.hashCode() .

Usage

From source file:com.pingcap.tikv.meta.TiDBInfo.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = prime + Long.hashCode(getId());
    return result * prime + getName().hashCode();
}

From source file:com.cloudera.oryx.common.math.DoubleWeightedMean.java

@Override
public int hashCode() {
    return Long.hashCode(count) ^ Double.hashCode(totalWeight) ^ Double.hashCode(mean);
}

From source file:com.github.nginate.commons.testing.Unique.java

/**
 * Generate unique int. Uses {@link Long#hashCode(long) long hashcode function} to reduce collisions on casting from
 * long to int. Produces values greater than 0.
 *
 * @return unique int/*from  w  ww. j a v a 2 s  .c o  m*/
 * @see Long#hashCode(long)
 */
@Nonnull
public static Integer uniqueInteger() {
    return Long.hashCode(uniqueLong());
}

From source file:org.formix.dsx.XmlText.java

@Override
public int hashCode() {
    return this.getClass().getName().hashCode() ^ Long.hashCode(this.getId());
}

From source file:net.mintern.primitive.pair.LongPair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code//from  w  w w  .  ja v a 2 s .c o  m
 * @see Long#hashCode(long)
 */
@Override
public int hashCode() {
    return Long.hashCode(getLeft()) ^ Long.hashCode(getRight());
}

From source file:keywhiz.api.ApiDate.java

@Override
public int hashCode() {
    return Long.hashCode(this.epochSecond);
}

From source file:net.mintern.primitive.pair.LongIntPair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/*w  w  w  . j  av a2  s .  c  om*/
 * @see Long#hashCode(long)
 * @see Integer#hashCode(int)
 */
@Override
public int hashCode() {
    return Long.hashCode(getLeft()) ^ Integer.hashCode(getRight());
}

From source file:net.mintern.primitive.pair.LongBytePair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/*w  ww. j  a  va  2 s .  c  om*/
 * @see Long#hashCode(long)
 * @see Byte#hashCode(byte)
 */
@Override
public int hashCode() {
    return Long.hashCode(getLeft()) ^ Byte.hashCode(getRight());
}

From source file:net.mintern.primitive.pair.LongFloatPair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/* w  w  w.ja  v a2s  . com*/
 * @see Long#hashCode(long)
 * @see Float#hashCode(float)
 */
@Override
public int hashCode() {
    return Long.hashCode(getLeft()) ^ Float.hashCode(getRight());
}

From source file:net.mintern.primitive.pair.LongCharPair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/*  ww  w.ja  va 2  s .  co m*/
 * @see Long#hashCode(long)
 * @see Character#hashCode(char)
 */
@Override
public int hashCode() {
    return Long.hashCode(getLeft()) ^ Character.hashCode(getRight());
}