--- old/src/share/classes/java/lang/Double.java 2011-09-20 12:56:31.000000000 -0700 +++ new/src/share/classes/java/lang/Double.java 2011-09-20 12:56:31.000000000 -0700 @@ -123,6 +123,13 @@ public static final int SIZE = 64; /** + * The number of bytes used to represent a {@code double} value. + * + * @since 1.8 + */ + public static final int BYTES = SIZE / Byte.SIZE; + + /** * The {@code Class} instance representing the primitive type * {@code double}. * @@ -730,6 +737,19 @@ long bits = doubleToLongBits(value); return (int)(bits ^ (bits >>> 32)); } + + /** + * Returns a hash code for a {@code double} value; compatible with + * {@code Double.hashCode()}. + * + * @since 1.8 + * + * @return a hash code value for a {@code double} value. + */ + public static int hashCode(double value) { + long bits = doubleToLongBits(value); + return (int)(bits ^ (bits >>> 32)); + } /** * Compares this object against the specified object. The result