Example usage for java.lang Integer hashCode

List of usage examples for java.lang Integer hashCode

Introduction

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

Prototype

public static int hashCode(int value) 

Source Link

Document

Returns a hash code for an int value; compatible with Integer.hashCode() .

Usage

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

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

From source file:net.mintern.primitive.pair.IntBytePair.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  a  2  s. c om
 * @see Integer#hashCode(int)
 * @see Byte#hashCode(byte)
 */
@Override
public int hashCode() {
    return Integer.hashCode(getLeft()) ^ Byte.hashCode(getRight());
}

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

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

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

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/*from   w  w w  .jav a 2 s.  c  om*/
 * @see Integer#hashCode(int)
 * @see Float#hashCode(float)
 */
@Override
public int hashCode() {
    return Integer.hashCode(getLeft()) ^ Float.hashCode(getRight());
}

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

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/* w w w  .j ava 2s .c  o  m*/
 * @see Integer#hashCode(int)
 * @see Character#hashCode(char)
 */
@Override
public int hashCode() {
    return Integer.hashCode(getLeft()) ^ Character.hashCode(getRight());
}

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

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/*from  w w  w  .  java 2s  .  co m*/
 * @see Byte#hashCode(byte)
 * @see Integer#hashCode(int)
 */
@Override
public int hashCode() {
    return Byte.hashCode(getLeft()) ^ Integer.hashCode(getRight());
}

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  ww.j  a v 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.FloatIntPair.java

/**
 * Returns a hash code that follows the definition in {@link java.util.Map.Entry#hashCode()}.
 *
 * @return the hash code/* www  . jav  a 2  s  .c o  m*/
 * @see Float#hashCode(float)
 * @see Integer#hashCode(int)
 */
@Override
public int hashCode() {
    return Float.hashCode(getLeft()) ^ Integer.hashCode(getRight());
}

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

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

From source file:net.mintern.primitive.pair.CharIntPair.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 a  2  s. c  o  m*/
 * @see Character#hashCode(char)
 * @see Integer#hashCode(int)
 */
@Override
public int hashCode() {
    return Character.hashCode(getLeft()) ^ Integer.hashCode(getRight());
}