jdk/src/java.base/share/classes/java/lang/Character.java
changeset 38339 65b26013c786
parent 37521 b6e0f285c998
child 44844 b2b4d98404ba
equal deleted inserted replaced
38338:f3909e996a6a 38339:65b26013c786
  1254          */
  1254          */
  1255         public static final UnicodeBlock SPECIALS =
  1255         public static final UnicodeBlock SPECIALS =
  1256             new UnicodeBlock("SPECIALS");
  1256             new UnicodeBlock("SPECIALS");
  1257 
  1257 
  1258         /**
  1258         /**
  1259          * @deprecated As of J2SE 5, use {@link #HIGH_SURROGATES},
  1259          * @deprecated
  1260          *             {@link #HIGH_PRIVATE_USE_SURROGATES}, and
  1260          * Instead of {@code SURROGATES_AREA}, use {@link #HIGH_SURROGATES},
  1261          *             {@link #LOW_SURROGATES}. These new constants match
  1261          * {@link #HIGH_PRIVATE_USE_SURROGATES}, and {@link #LOW_SURROGATES}.
  1262          *             the block definitions of the Unicode Standard.
  1262          * These constants match the block definitions of the Unicode Standard.
  1263          *             The {@link #of(char)} and {@link #of(int)} methods
  1263          * The {@link #of(char)} and {@link #of(int)} methods return the
  1264          *             return the new constants, not SURROGATES_AREA.
  1264          * standard constants.
  1265          */
  1265          */
  1266         @Deprecated
  1266         @Deprecated(since="1.5")
  1267         public static final UnicodeBlock SURROGATES_AREA =
  1267         public static final UnicodeBlock SURROGATES_AREA =
  1268             new UnicodeBlock("SURROGATES_AREA");
  1268             new UnicodeBlock("SURROGATES_AREA");
  1269 
  1269 
  1270         /**
  1270         /**
  1271          * Constant for the "Syriac" Unicode character block.
  1271          * Constant for the "Syriac" Unicode character block.
  7449      * Constructs a newly allocated {@code Character} object that
  7449      * Constructs a newly allocated {@code Character} object that
  7450      * represents the specified {@code char} value.
  7450      * represents the specified {@code char} value.
  7451      *
  7451      *
  7452      * @param  value   the value to be represented by the
  7452      * @param  value   the value to be represented by the
  7453      *                  {@code Character} object.
  7453      *                  {@code Character} object.
  7454      */
  7454      *
       
  7455      * @deprecated
       
  7456      * It is rarely appropriate to use this constructor. The static factory
       
  7457      * {@link #valueOf(char)} is generally a better choice, as it is
       
  7458      * likely to yield significantly better space and time performance.
       
  7459      */
       
  7460     @Deprecated(since="9")
  7455     public Character(char value) {
  7461     public Character(char value) {
  7456         this.value = value;
  7462         this.value = value;
  7457     }
  7463     }
  7458 
  7464 
  7459     private static class CharacterCache {
  7465     private static class CharacterCache {
  8797      * @see     Character#isLetterOrDigit(char)
  8803      * @see     Character#isLetterOrDigit(char)
  8798      * @see     Character#isUnicodeIdentifierStart(char)
  8804      * @see     Character#isUnicodeIdentifierStart(char)
  8799      * @since   1.0.2
  8805      * @since   1.0.2
  8800      * @deprecated Replaced by isJavaIdentifierStart(char).
  8806      * @deprecated Replaced by isJavaIdentifierStart(char).
  8801      */
  8807      */
  8802     @Deprecated
  8808     @Deprecated(since="1.1")
  8803     public static boolean isJavaLetter(char ch) {
  8809     public static boolean isJavaLetter(char ch) {
  8804         return isJavaIdentifierStart(ch);
  8810         return isJavaIdentifierStart(ch);
  8805     }
  8811     }
  8806 
  8812 
  8807     /**
  8813     /**
  8833      * @see     Character#isUnicodeIdentifierPart(char)
  8839      * @see     Character#isUnicodeIdentifierPart(char)
  8834      * @see     Character#isIdentifierIgnorable(char)
  8840      * @see     Character#isIdentifierIgnorable(char)
  8835      * @since   1.0.2
  8841      * @since   1.0.2
  8836      * @deprecated Replaced by isJavaIdentifierPart(char).
  8842      * @deprecated Replaced by isJavaIdentifierPart(char).
  8837      */
  8843      */
  8838     @Deprecated
  8844     @Deprecated(since="1.1")
  8839     public static boolean isJavaLetterOrDigit(char ch) {
  8845     public static boolean isJavaLetterOrDigit(char ch) {
  8840         return isJavaIdentifierPart(ch);
  8846         return isJavaIdentifierPart(ch);
  8841     }
  8847     }
  8842 
  8848 
  8843     /**
  8849     /**
  9578      *             space; {@code false} otherwise.
  9584      *             space; {@code false} otherwise.
  9579      * @see        Character#isSpaceChar(char)
  9585      * @see        Character#isSpaceChar(char)
  9580      * @see        Character#isWhitespace(char)
  9586      * @see        Character#isWhitespace(char)
  9581      * @deprecated Replaced by isWhitespace(char).
  9587      * @deprecated Replaced by isWhitespace(char).
  9582      */
  9588      */
  9583     @Deprecated
  9589     @Deprecated(since="1.1")
  9584     public static boolean isSpace(char ch) {
  9590     public static boolean isSpace(char ch) {
  9585         return (ch <= 0x0020) &&
  9591         return (ch <= 0x0020) &&
  9586             (((((1L << 0x0009) |
  9592             (((((1L << 0x0009) |
  9587             (1L << 0x000A) |
  9593             (1L << 0x000A) |
  9588             (1L << 0x000C) |
  9594             (1L << 0x000C) |