public int hashCode()
    {
        final long bits;
        switch (representation)
        {
            case LONG:
                bits = longValue;
                break;

            case DOUBLE:
                bits = doubleToLongBits(doubleValue);
                break;

            case BYTE_ARRAY:
                return Arrays.hashCode(bytesValue);

            default:
                throw new IllegalStateException("Unrecognised representation: " + representation);
        }

        return (int)(bits ^ (bits >>> 32));
    }
Return hashCode for value. This is the underlying representations hashCode for the value.

@return int value of the hashCode.
sbe-tool/src/main/java/uk/co/real_logic/sbe/PrimitiveValue.java