8229831: Upgrade Character.isUnicodeIdentifierStart/Part() methods to the latest standard

Reviewed-by: rriggs
This commit is contained in:
Naoto Sato 2019-09-05 17:38:54 -07:00
parent 4d70cdac4f
commit 2aac0e925d
13 changed files with 12096 additions and 75 deletions

View file

@ -9917,7 +9917,18 @@ class Character implements java.io.Serializable, Comparable<Character> {
* <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
* <li> {@link #getType(char) getType(ch)} returns
* {@code LETTER_NUMBER}.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Start">
* {@code Other_ID_Start}</a> character.
* </ul>
* <p>
* This method conforms to <a href="https://unicode.org/reports/tr31/#R1">
* UAX31-R1: Default Identifiers</a> requirement of the Unicode Standard,
* with the following profile of UAX31:
* <pre>
* Start := ID_Start + 'VERTICAL TILDE' (U+2E2F)
* </pre>
* {@code 'VERTICAL TILDE'} is added to {@code Start} for backward
* compatibility.
*
* <p><b>Note:</b> This method cannot handle <a
* href="#supplementary"> supplementary characters</a>. To support
@ -9947,7 +9958,19 @@ class Character implements java.io.Serializable, Comparable<Character> {
* returns {@code true}
* <li> {@link #getType(int) getType(codePoint)}
* returns {@code LETTER_NUMBER}.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Start">
* {@code Other_ID_Start}</a> character.
* </ul>
* <p>
* This method conforms to <a href="https://unicode.org/reports/tr31/#R1">
* UAX31-R1: Default Identifiers</a> requirement of the Unicode Standard,
* with the following profile of UAX31:
* <pre>
* Start := ID_Start + 'VERTICAL TILDE' (U+2E2F)
* </pre>
* {@code 'VERTICAL TILDE'} is added to {@code Start} for backward
* compatibility.
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {@code true} if the character may start a Unicode
* identifier; {@code false} otherwise.
@ -9975,7 +9998,22 @@ class Character implements java.io.Serializable, Comparable<Character> {
* <li> it is a non-spacing mark
* <li> {@code isIdentifierIgnorable} returns
* {@code true} for this character.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Start">
* {@code Other_ID_Start}</a> character.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Continue">
* {@code Other_ID_Continue}</a> character.
* </ul>
* <p>
* This method conforms to <a href="https://unicode.org/reports/tr31/#R1">
* UAX31-R1: Default Identifiers</a> requirement of the Unicode Standard,
* with the following profile of UAX31:
* <pre>
* Continue := Start + ID_Continue + ignorable
* Medial := empty
* ignorable := isIdentifierIgnorable(char) returns true for the character
* </pre>
* {@code ignorable} is added to {@code Continue} for backward
* compatibility.
*
* <p><b>Note:</b> This method cannot handle <a
* href="#supplementary"> supplementary characters</a>. To support
@ -10010,7 +10048,23 @@ class Character implements java.io.Serializable, Comparable<Character> {
* <li> it is a non-spacing mark
* <li> {@code isIdentifierIgnorable} returns
* {@code true} for this character.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Start">
* {@code Other_ID_Start}</a> character.
* <li> it is an <a href="http://www.unicode.org/reports/tr44/#Other_ID_Continue">
* {@code Other_ID_Continue}</a> character.
* </ul>
* <p>
* This method conforms to <a href="https://unicode.org/reports/tr31/#R1">
* UAX31-R1: Default Identifiers</a> requirement of the Unicode Standard,
* with the following profile of UAX31:
* <pre>
* Continue := Start + ID_Continue + ignorable
* Medial := empty
* ignorable := isIdentifierIgnorable(int) returns true for the character
* </pre>
* {@code ignorable} is added to {@code Continue} for backward
* compatibility.
*
* @param codePoint the character (Unicode code point) to be tested.
* @return {@code true} if the character may be part of a
* Unicode identifier; {@code false} otherwise.