/[classpath]/classpath/java/lang/Character.java
ViewVC logotype

Diff of /classpath/java/lang/Character.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by ericb, Mon Feb 18 20:07:17 2002 UTC revision 1.22 by ericb, Tue Feb 19 05:48:54 2002 UTC
# Line 59  import gnu.java.lang.CharData; Line 59  import gnu.java.lang.CharData;
59   * for more information on the Unicode Standard.   * for more information on the Unicode Standard.
60   *   *
61   * @author Paul N. Fisher   * @author Paul N. Fisher
62     * @author Jochen Hoenicke
63   * @author Eric Blake <ebb9@email.byu.edu>   * @author Eric Blake <ebb9@email.byu.edu>
64   * @since 1.0   * @since 1.0
65     * @see CharData
66   */   */
67  public final class Character implements Serializable, Comparable  public final class Character implements Serializable, Comparable
68  {  {
# Line 875  public final class Character implements Line 877  public final class Character implements
877    
878      /**      /**
879       * Specials.       * Specials.
880       * '\uFFF0' - '\uFFFD'.       * '\uFEFF', '\uFFF0' - '\uFFFD'.
881       */       */
882      public final static UnicodeBlock SPECIALS      public final static UnicodeBlock SPECIALS
883        = new UnicodeBlock('\uFFF0', '\uFFFD',        = new UnicodeBlock('\uFFF0', '\uFFFD',
# Line 1431  public final class Character implements Line 1433  public final class Character implements
1433     */     */
1434    private static final int TYPE_MASK = 0x1F;    private static final int TYPE_MASK = 0x1F;
1435    
1436    /** Mask for grabbing the non-breaking space flag out of the contents of    /**
1437       * Mask for grabbing the non-breaking space flag out of the contents of
1438     * data.     * data.
1439     * @see CharData#DATA     * @see CharData#DATA
1440     */     */
1441    private static final int NO_BREAK_MASK = 0x20;    private static final int NO_BREAK_MASK = 0x20;
1442    
1443    /** Mask for grabbing the mirrored directionality flag out of the contents    /**
1444       * Mask for grabbing the mirrored directionality flag out of the contents
1445     * of data.     * of data.
1446     * @see CharData#DATA     * @see CharData#DATA
1447     */     */
# Line 1455  public final class Character implements Line 1459  public final class Character implements
1459     */     */
1460    private static char readChar(char ch)    private static char readChar(char ch)
1461    {    {
1462      return data[blocks[ch >> CharData.SHIFT]      // Perform 16-bit addition to find the correct entry in data.
1463                  + (ch & ~(-1 << CharData.SHIFT))];      return data[(char) (blocks[ch >> CharData.SHIFT] + ch)];
1464    }    }
1465    
1466    /**    /**

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26