5858 * character in a Java identifier.
5859 * <p>
5860 * A character may start a Java identifier if and only if
5861 * one of the following is true:
5862 * <ul>
5863 * <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
5864 * <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER}
5865 * <li> {@code ch} is a currency symbol (such as {@code '$'})
5866 * <li> {@code ch} is a connecting punctuation character (such as {@code '_'}).
5867 * </ul>
5868 *
5869 * @param ch the character to be tested.
5870 * @return {@code true} if the character may start a Java
5871 * identifier; {@code false} otherwise.
5872 * @see Character#isJavaLetterOrDigit(char)
5873 * @see Character#isJavaIdentifierStart(char)
5874 * @see Character#isJavaIdentifierPart(char)
5875 * @see Character#isLetter(char)
5876 * @see Character#isLetterOrDigit(char)
5877 * @see Character#isUnicodeIdentifierStart(char)
5878 * @since 1.02
5879 * @deprecated Replaced by isJavaIdentifierStart(char).
5880 */
5881 @Deprecated
5882 public static boolean isJavaLetter(char ch) {
5883 return isJavaIdentifierStart(ch);
5884 }
5885
5886 /**
5887 * Determines if the specified character may be part of a Java
5888 * identifier as other than the first character.
5889 * <p>
5890 * A character may be part of a Java identifier if and only if any
5891 * of the following are true:
5892 * <ul>
5893 * <li> it is a letter
5894 * <li> it is a currency symbol (such as {@code '$'})
5895 * <li> it is a connecting punctuation character (such as {@code '_'})
5896 * <li> it is a digit
5897 * <li> it is a numeric letter (such as a Roman numeral character)
5898 * <li> it is a combining mark
5899 * <li> it is a non-spacing mark
5900 * <li> {@code isIdentifierIgnorable} returns
5901 * {@code true} for the character.
5902 * </ul>
5903 *
5904 * @param ch the character to be tested.
5905 * @return {@code true} if the character may be part of a
5906 * Java identifier; {@code false} otherwise.
5907 * @see Character#isJavaLetter(char)
5908 * @see Character#isJavaIdentifierStart(char)
5909 * @see Character#isJavaIdentifierPart(char)
5910 * @see Character#isLetter(char)
5911 * @see Character#isLetterOrDigit(char)
5912 * @see Character#isUnicodeIdentifierPart(char)
5913 * @see Character#isIdentifierIgnorable(char)
5914 * @since 1.02
5915 * @deprecated Replaced by isJavaIdentifierPart(char).
5916 */
5917 @Deprecated
5918 public static boolean isJavaLetterOrDigit(char ch) {
5919 return isJavaIdentifierPart(ch);
5920 }
5921
5922 /**
5923 * Determines if the specified character (Unicode code point) is an alphabet.
5924 * <p>
5925 * A character is considered to be alphabetic if its general category type,
5926 * provided by {@link Character#getType(int) getType(codePoint)}, is any of
5927 * the following:
5928 * <ul>
5929 * <li> <code>UPPERCASE_LETTER</code>
5930 * <li> <code>LOWERCASE_LETTER</code>
5931 * <li> <code>TITLECASE_LETTER</code>
5932 * <li> <code>MODIFIER_LETTER</code>
5933 * <li> <code>OTHER_LETTER</code>
5934 * <li> <code>LETTER_NUMBER</code>
|
5858 * character in a Java identifier.
5859 * <p>
5860 * A character may start a Java identifier if and only if
5861 * one of the following is true:
5862 * <ul>
5863 * <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
5864 * <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER}
5865 * <li> {@code ch} is a currency symbol (such as {@code '$'})
5866 * <li> {@code ch} is a connecting punctuation character (such as {@code '_'}).
5867 * </ul>
5868 *
5869 * @param ch the character to be tested.
5870 * @return {@code true} if the character may start a Java
5871 * identifier; {@code false} otherwise.
5872 * @see Character#isJavaLetterOrDigit(char)
5873 * @see Character#isJavaIdentifierStart(char)
5874 * @see Character#isJavaIdentifierPart(char)
5875 * @see Character#isLetter(char)
5876 * @see Character#isLetterOrDigit(char)
5877 * @see Character#isUnicodeIdentifierStart(char)
5878 * @since 1.0.2
5879 * @deprecated Replaced by isJavaIdentifierStart(char).
5880 */
5881 @Deprecated
5882 public static boolean isJavaLetter(char ch) {
5883 return isJavaIdentifierStart(ch);
5884 }
5885
5886 /**
5887 * Determines if the specified character may be part of a Java
5888 * identifier as other than the first character.
5889 * <p>
5890 * A character may be part of a Java identifier if and only if any
5891 * of the following are true:
5892 * <ul>
5893 * <li> it is a letter
5894 * <li> it is a currency symbol (such as {@code '$'})
5895 * <li> it is a connecting punctuation character (such as {@code '_'})
5896 * <li> it is a digit
5897 * <li> it is a numeric letter (such as a Roman numeral character)
5898 * <li> it is a combining mark
5899 * <li> it is a non-spacing mark
5900 * <li> {@code isIdentifierIgnorable} returns
5901 * {@code true} for the character.
5902 * </ul>
5903 *
5904 * @param ch the character to be tested.
5905 * @return {@code true} if the character may be part of a
5906 * Java identifier; {@code false} otherwise.
5907 * @see Character#isJavaLetter(char)
5908 * @see Character#isJavaIdentifierStart(char)
5909 * @see Character#isJavaIdentifierPart(char)
5910 * @see Character#isLetter(char)
5911 * @see Character#isLetterOrDigit(char)
5912 * @see Character#isUnicodeIdentifierPart(char)
5913 * @see Character#isIdentifierIgnorable(char)
5914 * @since 1.0.2
5915 * @deprecated Replaced by isJavaIdentifierPart(char).
5916 */
5917 @Deprecated
5918 public static boolean isJavaLetterOrDigit(char ch) {
5919 return isJavaIdentifierPart(ch);
5920 }
5921
5922 /**
5923 * Determines if the specified character (Unicode code point) is an alphabet.
5924 * <p>
5925 * A character is considered to be alphabetic if its general category type,
5926 * provided by {@link Character#getType(int) getType(codePoint)}, is any of
5927 * the following:
5928 * <ul>
5929 * <li> <code>UPPERCASE_LETTER</code>
5930 * <li> <code>LOWERCASE_LETTER</code>
5931 * <li> <code>TITLECASE_LETTER</code>
5932 * <li> <code>MODIFIER_LETTER</code>
5933 * <li> <code>OTHER_LETTER</code>
5934 * <li> <code>LETTER_NUMBER</code>
|