Example usage for java.lang Byte hashCode

List of usage examples for java.lang Byte hashCode

Introduction

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

Prototype

public static int hashCode(byte value) 

Source Link

Document

Returns a hash code for a byte value; compatible with Byte.hashCode() .

Usage

From source file:net.mintern.primitive.pair.ObjBytePair.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.co m*/
 * @see Objects#hashCode(Object)
 * @see Byte#hashCode(byte)
 */
@Override
public int hashCode() {
    return Objects.hashCode(getLeft()) ^ Byte.hashCode(getRight());
}