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