--- old/src/share/classes/java/lang/Long.java 2011-09-20 12:56:34.000000000 -0700 +++ new/src/share/classes/java/lang/Long.java 2011-09-20 12:56:34.000000000 -0700 @@ -786,6 +786,18 @@ } /** + * Returns a hash code for a {@code long} value; compatible with + * {@code Long.hashCode()}. + * + * @since 1.8 + * + * @return a hash code value for a {@code long} value. + */ + public static int hashCode(long value) { + return (int)(value ^ (value >>> 32)); + } + + /** * Compares this object to the specified object. The result is * {@code true} if and only if the argument is not * {@code null} and is a {@code Long} object that @@ -982,6 +994,14 @@ public static final int SIZE = 64; /** + * The number of bytes used to represent a {@code long} value in two's + * complement binary form. + * + * @since 1.8 + */ + public static final int BYTES = SIZE / Byte.SIZE; + + /** * Returns a {@code long} value with at most a single one-bit, in the * position of the highest-order ("leftmost") one-bit in the specified * {@code long} value. Returns zero if the specified value has no