diff options
author | Eric Blake <ebb9@byu.net> | 2002-02-19 05:48:54 +0000 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2002-02-19 05:48:54 +0000 |
commit | ed941fc9254421636ce0991a100b593c2ba1c9ea (patch) | |
tree | 45436a6e436d40e3536336c5565c29584790766b /java/lang/Character.java | |
parent | 9f437cec83ffb742e2553e9a71bdd34ba7eef714 (diff) | |
download | classpath-ed941fc9254421636ce0991a100b593c2ba1c9ea.tar.gz |
2002-02-18 Eric Blake <ebb9@email.byu.edu>
* doc/unicode/unicode-blocks.pl: Minor tweaks.
* doc/unicode/unicode-muncher.pl: Minor tweaks.
* java/lang/Character.java: Update to latest tweaks in
doc/unicode/*.pl.
* gnu/java/lang/CharData.java: Ditto.
Diffstat (limited to 'java/lang/Character.java')
-rw-r--r-- | java/lang/Character.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/java/lang/Character.java b/java/lang/Character.java index 732a26400..4d3c7c634 100644 --- a/java/lang/Character.java +++ b/java/lang/Character.java @@ -59,8 +59,10 @@ import gnu.java.lang.CharData; * for more information on the Unicode Standard. * * @author Paul N. Fisher + * @author Jochen Hoenicke * @author Eric Blake <ebb9@email.byu.edu> * @since 1.0 + * @see CharData */ public final class Character implements Serializable, Comparable { @@ -875,7 +877,7 @@ public final class Character implements Serializable, Comparable /** * Specials. - * '\uFFF0' - '\uFFFD'. + * '\uFEFF', '\uFFF0' - '\uFFFD'. */ public final static UnicodeBlock SPECIALS = new UnicodeBlock('\uFFF0', '\uFFFD', @@ -1431,13 +1433,15 @@ public final class Character implements Serializable, Comparable */ private static final int TYPE_MASK = 0x1F; - /** Mask for grabbing the non-breaking space flag out of the contents of + /** + * Mask for grabbing the non-breaking space flag out of the contents of * data. * @see CharData#DATA */ private static final int NO_BREAK_MASK = 0x20; - /** Mask for grabbing the mirrored directionality flag out of the contents + /** + * Mask for grabbing the mirrored directionality flag out of the contents * of data. * @see CharData#DATA */ @@ -1455,8 +1459,8 @@ public final class Character implements Serializable, Comparable */ private static char readChar(char ch) { - return data[blocks[ch >> CharData.SHIFT] - + (ch & ~(-1 << CharData.SHIFT))]; + // Perform 16-bit addition to find the correct entry in data. + return data[(char) (blocks[ch >> CharData.SHIFT] + ch)]; } /** |