jdk/src/share/classes/java/lang/Integer.java
changeset 14503 0729d9e57ed5
parent 14014 da3648e13e67
child 14507 066419d1e732
--- a/jdk/src/share/classes/java/lang/Integer.java	Mon Nov 12 11:12:29 2012 +0900
+++ b/jdk/src/share/classes/java/lang/Integer.java	Tue Nov 13 20:02:48 2012 -0800
@@ -918,7 +918,20 @@
      *          primitive {@code int} value represented by this
      *          {@code Integer} object.
      */
+    @Override
     public int hashCode() {
+        return Integer.hashCode(value);
+    }
+
+    /**
+     * Returns a hash code for a {@code int} value; compatible with
+     * {@code Integer.hashCode()}.
+     *
+     * @since 1.8
+     *
+     * @return a hash code value for a {@code int} value.
+     */
+    public static int hashCode(int value) {
         return value;
     }