/* * Copyright (c) 2002, 2022, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions.
*/
/** * The {@code Character} class wraps a value of the primitive * type {@code char} in an object. An object of class * {@code Character} contains a single field whose type is * {@code char}. * <p> * In addition, this class provides a large number of static methods for * determining a character's category (lowercase letter, digit, etc.) * and for converting characters from uppercase to lowercase and vice * versa. * * <h2><a id="conformance">Unicode Conformance</a></h2> * <p> * The fields and methods of class {@code Character} are defined in terms * of character information from the Unicode Standard, specifically the * <i>UnicodeData</i> file that is part of the Unicode Character Database. * This file specifies properties including name and category for every * assigned Unicode code point or character range. The file is available * from the Unicode Consortium at * <a href="http://www.unicode.org">http://www.unicode.org</a>. * <p> * Character information is based on the Unicode Standard, version 15.0. * <p> * The Java platform has supported different versions of the Unicode * Standard over time. Upgrades to newer versions of the Unicode Standard * occurred in the following Java releases, each indicating the new version: * <table class="striped"> * <caption style="display:none">Shows Java releases and supported Unicode versions</caption> * <thead> * <tr><th scope="col">Java release</th> * <th scope="col">Unicode version</th></tr> * </thead> * <tbody> * <tr><th scope="row" style="text-align:left">Java SE 20</th> * <td>Unicode 15.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 19</th> * <td>Unicode 14.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 15</th> * <td>Unicode 13.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 13</th> * <td>Unicode 12.1</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 12</th> * <td>Unicode 11.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 11</th> * <td>Unicode 10.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 9</th> * <td>Unicode 8.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 8</th> * <td>Unicode 6.2</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 7</th> * <td>Unicode 6.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 5.0</th> * <td>Unicode 4.0</td></tr> * <tr><th scope="row" style="text-align:left">Java SE 1.4</th> * <td>Unicode 3.0</td></tr> * <tr><th scope="row" style="text-align:left">JDK 1.1</th> * <td>Unicode 2.0</td></tr> * <tr><th scope="row" style="text-align:left">JDK 1.0.2</th> * <td>Unicode 1.1.5</td></tr> * </tbody> * </table> * Variations from these base Unicode versions, such as recognized appendixes, * are documented elsewhere. * <h2><a id="unicode">Unicode Character Representations</a></h2> * * <p>The {@code char} data type (and therefore the value that a * {@code Character} object encapsulates) are based on the * original Unicode specification, which defined characters as * fixed-width 16-bit entities. The Unicode Standard has since been * changed to allow for characters whose representation requires more * than 16 bits. The range of legal <em>code point</em>s is now * U+0000 to U+10FFFF, known as <em>Unicode scalar value</em>. * (Refer to the <a * href="http://www.unicode.org/reports/tr27/#notation"><i> * definition</i></a> of the U+<i>n</i> notation in the Unicode * Standard.) * * <p><a id="BMP">The set of characters from U+0000 to U+FFFF</a> is * sometimes referred to as the <em>Basic Multilingual Plane (BMP)</em>. * <a id="supplementary">Characters</a> whose code points are greater * than U+FFFF are called <em>supplementary character</em>s. The Java * platform uses the UTF-16 representation in {@code char} arrays and * in the {@code String} and {@code StringBuffer} classes. In * this representation, supplementary characters are represented as a pair * of {@code char} values, the first from the <em>high-surrogates</em> * range, (\uD800-\uDBFF), the second from the * <em>low-surrogates</em> range (\uDC00-\uDFFF). * * <p>A {@code char} value, therefore, represents Basic * Multilingual Plane (BMP) code points, including the surrogate * code points, or code units of the UTF-16 encoding. An * {@code int} value represents all Unicode code points, * including supplementary code points. The lower (least significant) * 21 bits of {@code int} are used to represent Unicode code * points and the upper (most significant) 11 bits must be zero. * Unless otherwise specified, the behavior with respect to * supplementary characters and surrogate {@code char} values is * as follows: * * <ul> * <li>The methods that only accept a {@code char} value cannot support * supplementary characters. They treat {@code char} values from the * surrogate ranges as undefined characters. For example, * {@code Character.isLetter('\u005CuD840')} returns {@code false}, even though * this specific value if followed by any low-surrogate value in a string * would represent a letter. * * <li>The methods that accept an {@code int} value support all * Unicode characters, including supplementary characters. For * example, {@code Character.isLetter(0x2F81A)} returns * {@code true} because the code point value represents a letter * (a CJK ideograph). * </ul> * * <p>In the Java SE API documentation, <em>Unicode code point</em> is * used for character values in the range between U+0000 and U+10FFFF, * and <em>Unicode code unit</em> is used for 16-bit * {@code char} values that are code units of the <em>UTF-16</em> * encoding. For more information on Unicode terminology, refer to the * <a href="http://www.unicode.org/glossary/">Unicode Glossary</a>. * * <p>This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a> * class; programmers should treat instances that are * {@linkplain #equals(Object) equal} as interchangeable and should not * use instances for synchronization, or unpredictable behavior may * occur. For example, in a future release, synchronization may fail. * * @author Lee Boynton * @author Guy Steele * @author Akira Tanaka * @author Martin Buchholz * @author Ulf Zibis * @since 1.0
*/
@jdk.internal.ValueBased publicfinal class Character implements java.io.Serializable, Comparable<Character>, Constable { /** * The minimum radix available for conversion to and from strings. * The constant value of this field is the smallest value permitted * for the radix argument in radix-conversion methods such as the * {@code digit} method, the {@code forDigit} method, and the * {@code toString} method of class {@code Integer}. * * @see Character#digit(char, int) * @see Character#forDigit(int, int) * @see Integer#toString(int, int) * @see Integer#valueOf(String)
*/ publicstaticfinalint MIN_RADIX = 2;
/** * The maximum radix available for conversion to and from strings. * The constant value of this field is the largest value permitted * for the radix argument in radix-conversion methods such as the * {@code digit} method, the {@code forDigit} method, and the * {@code toString} method of class {@code Integer}. * * @see Character#digit(char, int) * @see Character#forDigit(int, int) * @see Integer#toString(int, int) * @see Integer#valueOf(String)
*/ publicstaticfinalint MAX_RADIX = 36;
/** * The constant value of this field is the smallest value of type * {@code char}, {@code '\u005Cu0000'}. * * @since 1.0.2
*/ publicstaticfinalchar MIN_VALUE = '\u0000';
/** * The constant value of this field is the largest value of type * {@code char}, {@code '\u005CuFFFF'}. * * @since 1.0.2
*/ publicstaticfinalchar MAX_VALUE = '\uFFFF';
/** * The {@code Class} instance representing the primitive type * {@code char}. * * @since 1.1
*/
@SuppressWarnings("unchecked") publicstaticfinalClass<Character> TYPE = (Class<Character>) Class.getPrimitiveClass("char");
/* * Normative general types
*/
/* * General character types
*/
/** * General category "Cn" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte UNASSIGNED = 0;
/** * General category "Lu" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte UPPERCASE_LETTER = 1;
/** * General category "Ll" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte LOWERCASE_LETTER = 2;
/** * General category "Lt" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte TITLECASE_LETTER = 3;
/** * General category "Lm" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte MODIFIER_LETTER = 4;
/** * General category "Lo" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte OTHER_LETTER = 5;
/** * General category "Mn" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte NON_SPACING_MARK = 6;
/** * General category "Me" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte ENCLOSING_MARK = 7;
/** * General category "Mc" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte COMBINING_SPACING_MARK = 8;
/** * General category "Nd" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte DECIMAL_DIGIT_NUMBER = 9;
/** * General category "Nl" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte LETTER_NUMBER = 10;
/** * General category "No" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte OTHER_NUMBER = 11;
/** * General category "Zs" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte SPACE_SEPARATOR = 12;
/** * General category "Zl" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte LINE_SEPARATOR = 13;
/** * General category "Zp" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte PARAGRAPH_SEPARATOR = 14;
/** * General category "Cc" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte CONTROL = 15;
/** * General category "Cf" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte FORMAT = 16;
/** * General category "Co" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte PRIVATE_USE = 18;
/** * General category "Cs" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte SURROGATE = 19;
/** * General category "Pd" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte DASH_PUNCTUATION = 20;
/** * General category "Ps" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte START_PUNCTUATION = 21;
/** * General category "Pe" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte END_PUNCTUATION = 22;
/** * General category "Pc" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte CONNECTOR_PUNCTUATION = 23;
/** * General category "Po" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte OTHER_PUNCTUATION = 24;
/** * General category "Sm" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte MATH_SYMBOL = 25;
/** * General category "Sc" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte CURRENCY_SYMBOL = 26;
/** * General category "Sk" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte MODIFIER_SYMBOL = 27;
/** * General category "So" in the Unicode specification. * @since 1.1
*/ publicstaticfinalbyte OTHER_SYMBOL = 28;
/** * General category "Pi" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte INITIAL_QUOTE_PUNCTUATION = 29;
/** * General category "Pf" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte FINAL_QUOTE_PUNCTUATION = 30;
/** * Error flag. Use int (code point) to avoid confusion with U+FFFF.
*/ staticfinalint ERROR = 0xFFFFFFFF;
/** * Undefined bidirectional character type. Undefined {@code char} * values have undefined directionality in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_UNDEFINED = -1;
/** * Strong bidirectional character type "L" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_LEFT_TO_RIGHT = 0;
/** * Strong bidirectional character type "R" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_RIGHT_TO_LEFT = 1;
/** * Strong bidirectional character type "AL" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2;
/** * Weak bidirectional character type "EN" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_EUROPEAN_NUMBER = 3;
/** * Weak bidirectional character type "ES" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4;
/** * Weak bidirectional character type "ET" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5;
/** * Weak bidirectional character type "AN" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_ARABIC_NUMBER = 6;
/** * Weak bidirectional character type "CS" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7;
/** * Weak bidirectional character type "NSM" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_NONSPACING_MARK = 8;
/** * Weak bidirectional character type "BN" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9;
/** * Neutral bidirectional character type "B" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10;
/** * Neutral bidirectional character type "S" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_SEGMENT_SEPARATOR = 11;
/** * Neutral bidirectional character type "WS" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_WHITESPACE = 12;
/** * Neutral bidirectional character type "ON" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_OTHER_NEUTRALS = 13;
/** * Strong bidirectional character type "LRE" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14;
/** * Strong bidirectional character type "LRO" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15;
/** * Strong bidirectional character type "RLE" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16;
/** * Strong bidirectional character type "RLO" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17;
/** * Weak bidirectional character type "PDF" in the Unicode specification. * @since 1.4
*/ publicstaticfinalbyte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;
/** * Weak bidirectional character type "LRI" in the Unicode specification. * @since 9
*/ publicstaticfinalbyte DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE = 19;
/** * Weak bidirectional character type "RLI" in the Unicode specification. * @since 9
*/ publicstaticfinalbyte DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE = 20;
/** * Weak bidirectional character type "FSI" in the Unicode specification. * @since 9
*/ publicstaticfinalbyte DIRECTIONALITY_FIRST_STRONG_ISOLATE = 21;
/** * Weak bidirectional character type "PDI" in the Unicode specification. * @since 9
*/ publicstaticfinalbyte DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE = 22;
/** * The minimum value of a * <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit"> * Unicode high-surrogate code unit</a> * in the UTF-16 encoding, constant {@code '\u005CuD800'}. * A high-surrogate is also known as a <i>leading-surrogate</i>. * * @since 1.5
*/ publicstaticfinalchar MIN_HIGH_SURROGATE = '\uD800';
/** * The maximum value of a * <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit"> * Unicode high-surrogate code unit</a> * in the UTF-16 encoding, constant {@code '\u005CuDBFF'}. * A high-surrogate is also known as a <i>leading-surrogate</i>. * * @since 1.5
*/ publicstaticfinalchar MAX_HIGH_SURROGATE = '\uDBFF';
/** * The minimum value of a * <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit"> * Unicode low-surrogate code unit</a> * in the UTF-16 encoding, constant {@code '\u005CuDC00'}. * A low-surrogate is also known as a <i>trailing-surrogate</i>. * * @since 1.5
*/ publicstaticfinalchar MIN_LOW_SURROGATE = '\uDC00';
/** * The maximum value of a * <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit"> * Unicode low-surrogate code unit</a> * in the UTF-16 encoding, constant {@code '\u005CuDFFF'}. * A low-surrogate is also known as a <i>trailing-surrogate</i>. * * @since 1.5
*/ publicstaticfinalchar MAX_LOW_SURROGATE = '\uDFFF';
/** * The minimum value of a Unicode surrogate code unit in the * UTF-16 encoding, constant {@code '\u005CuD800'}. * * @since 1.5
*/ publicstaticfinalchar MIN_SURROGATE = MIN_HIGH_SURROGATE;
/** * The maximum value of a Unicode surrogate code unit in the * UTF-16 encoding, constant {@code '\u005CuDFFF'}. * * @since 1.5
*/ publicstaticfinalchar MAX_SURROGATE = MAX_LOW_SURROGATE;
/** * The minimum value of a * <a href="http://www.unicode.org/glossary/#supplementary_code_point"> * Unicode supplementary code point</a>, constant {@code U+10000}. * * @since 1.5
*/ publicstaticfinalint MIN_SUPPLEMENTARY_CODE_POINT = 0x010000;
/** * The minimum value of a * <a href="http://www.unicode.org/glossary/#code_point"> * Unicode code point</a>, constant {@code U+0000}. * * @since 1.5
*/ publicstaticfinalint MIN_CODE_POINT = 0x000000;
/** * The maximum value of a * <a href="http://www.unicode.org/glossary/#code_point"> * Unicode code point</a>, constant {@code U+10FFFF}. * * @since 1.5
*/ publicstaticfinalint MAX_CODE_POINT = 0X10FFFF;
/** * Returns an {@link Optional} containing the nominal descriptor for this * instance. * * @return an {@link Optional} describing the {@linkplain Character} instance * @since 15
*/
@Override public Optional<DynamicConstantDesc<Character>> describeConstable() { return Optional.of(DynamicConstantDesc.ofNamed(BSM_EXPLICIT_CAST, DEFAULT_NAME, CD_char, (int) value));
}
/** * Instances of this class represent particular subsets of the Unicode * character set. The only family of subsets defined in the * {@code Character} class is {@link Character.UnicodeBlock}. * Other portions of the Java API may define other subsets for their * own purposes. * * @since 1.2
*/ publicstaticclass Subset {
private String name;
/** * Constructs a new {@code Subset} instance. * * @param name The name of this subset * @throws NullPointerException if name is {@code null}
*/ protected Subset(String name) { if (name == null) { thrownew NullPointerException("name");
} this.name = name;
}
/** * Compares two {@code Subset} objects for equality. * This method returns {@code true} if and only if * {@code this} and the argument refer to the same * object; since this method is {@code final}, this * guarantee holds for all subclasses.
*/ publicfinalboolean equals(Object obj) { return (this == obj);
}
/** * Returns the standard hash code as defined by the * {@link Object#hashCode} method. This method * is {@code final} in order to ensure that the * {@code equals} and {@code hashCode} methods will * be consistent in all subclasses.
*/ publicfinalint hashCode() { returnsuper.hashCode();
}
/** * Returns the name of this subset.
*/ publicfinal String toString() { return name;
}
}
/** * A family of character subsets representing the character blocks in the * Unicode specification. Character blocks generally define characters * used for a specific script or purpose. A character is contained by * at most one Unicode block. * * @since 1.2
*/ publicstaticfinalclass UnicodeBlock extends Subset { /** * NUM_ENTITIES should match the total number of UnicodeBlocks. * It should be adjusted whenever the Unicode Character Database * is upgraded.
*/ privatestaticfinalint NUM_ENTITIES = 756; privatestatic Map<String, UnicodeBlock> map = HashMap.newHashMap(NUM_ENTITIES);
/** * Creates a UnicodeBlock with the given identifier name. * This name must be the same as the block identifier.
*/ private UnicodeBlock(String idName) { super(idName);
map.put(idName, this);
}
/** * Creates a UnicodeBlock with the given identifier name and * alias name.
*/ private UnicodeBlock(String idName, String alias) { this(idName);
map.put(alias, this);
}
/** * Creates a UnicodeBlock with the given identifier name and * alias names.
*/ private UnicodeBlock(String idName, String... aliases) { this(idName); for (String alias : aliases)
map.put(alias, this);
}
/** * Constant for the "Basic Latin" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock BASIC_LATIN = new UnicodeBlock("BASIC_LATIN", "BASIC LATIN", "BASICLATIN");
/** * Constant for the "Latin-1 Supplement" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LATIN_1_SUPPLEMENT = new UnicodeBlock("LATIN_1_SUPPLEMENT", "LATIN-1 SUPPLEMENT", "LATIN-1SUPPLEMENT");
/** * Constant for the "Latin Extended-A" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_A = new UnicodeBlock("LATIN_EXTENDED_A", "LATIN EXTENDED-A", "LATINEXTENDED-A");
/** * Constant for the "Latin Extended-B" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_B = new UnicodeBlock("LATIN_EXTENDED_B", "LATIN EXTENDED-B", "LATINEXTENDED-B");
/** * Constant for the "IPA Extensions" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock IPA_EXTENSIONS = new UnicodeBlock("IPA_EXTENSIONS", "IPA EXTENSIONS", "IPAEXTENSIONS");
/** * Constant for the "Spacing Modifier Letters" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock SPACING_MODIFIER_LETTERS = new UnicodeBlock("SPACING_MODIFIER_LETTERS", "SPACING MODIFIER LETTERS", "SPACINGMODIFIERLETTERS");
/** * Constant for the "Combining Diacritical Marks" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock COMBINING_DIACRITICAL_MARKS = new UnicodeBlock("COMBINING_DIACRITICAL_MARKS", "COMBINING DIACRITICAL MARKS", "COMBININGDIACRITICALMARKS");
/** * Constant for the "Greek and Coptic" Unicode character block. * <p> * This block was previously known as the "Greek" block. * * @since 1.2
*/ publicstaticfinal UnicodeBlock GREEK = new UnicodeBlock("GREEK", "GREEK AND COPTIC", "GREEKANDCOPTIC");
/** * Constant for the "Cyrillic" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CYRILLIC = new UnicodeBlock("CYRILLIC");
/** * Constant for the "Armenian" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ARMENIAN = new UnicodeBlock("ARMENIAN");
/** * Constant for the "Hebrew" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HEBREW = new UnicodeBlock("HEBREW");
/** * Constant for the "Arabic" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ARABIC = new UnicodeBlock("ARABIC");
/** * Constant for the "Devanagari" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock DEVANAGARI = new UnicodeBlock("DEVANAGARI");
/** * Constant for the "Bengali" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock BENGALI = new UnicodeBlock("BENGALI");
/** * Constant for the "Gurmukhi" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GURMUKHI = new UnicodeBlock("GURMUKHI");
/** * Constant for the "Gujarati" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GUJARATI = new UnicodeBlock("GUJARATI");
/** * Constant for the "Oriya" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ORIYA = new UnicodeBlock("ORIYA");
/** * Constant for the "Tamil" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock TAMIL = new UnicodeBlock("TAMIL");
/** * Constant for the "Telugu" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock TELUGU = new UnicodeBlock("TELUGU");
/** * Constant for the "Kannada" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock KANNADA = new UnicodeBlock("KANNADA");
/** * Constant for the "Malayalam" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock MALAYALAM = new UnicodeBlock("MALAYALAM");
/** * Constant for the "Thai" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock THAI = new UnicodeBlock("THAI");
/** * Constant for the "Lao" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LAO = new UnicodeBlock("LAO");
/** * Constant for the "Tibetan" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock TIBETAN = new UnicodeBlock("TIBETAN");
/** * Constant for the "Georgian" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GEORGIAN = new UnicodeBlock("GEORGIAN");
/** * Constant for the "Hangul Jamo" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HANGUL_JAMO = new UnicodeBlock("HANGUL_JAMO", "HANGUL JAMO", "HANGULJAMO");
/** * Constant for the "Latin Extended Additional" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_ADDITIONAL = new UnicodeBlock("LATIN_EXTENDED_ADDITIONAL", "LATIN EXTENDED ADDITIONAL", "LATINEXTENDEDADDITIONAL");
/** * Constant for the "Greek Extended" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GREEK_EXTENDED = new UnicodeBlock("GREEK_EXTENDED", "GREEK EXTENDED", "GREEKEXTENDED");
/** * Constant for the "General Punctuation" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GENERAL_PUNCTUATION = new UnicodeBlock("GENERAL_PUNCTUATION", "GENERAL PUNCTUATION", "GENERALPUNCTUATION");
/** * Constant for the "Superscripts and Subscripts" Unicode character * block. * @since 1.2
*/ publicstaticfinal UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS = new UnicodeBlock("SUPERSCRIPTS_AND_SUBSCRIPTS", "SUPERSCRIPTS AND SUBSCRIPTS", "SUPERSCRIPTSANDSUBSCRIPTS");
/** * Constant for the "Currency Symbols" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CURRENCY_SYMBOLS = new UnicodeBlock("CURRENCY_SYMBOLS", "CURRENCY SYMBOLS", "CURRENCYSYMBOLS");
/** * Constant for the "Combining Diacritical Marks for Symbols" Unicode * character block. * <p> * This block was previously known as "Combining Marks for Symbols". * @since 1.2
*/ publicstaticfinal UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS = new UnicodeBlock("COMBINING_MARKS_FOR_SYMBOLS", "COMBINING DIACRITICAL MARKS FOR SYMBOLS", "COMBININGDIACRITICALMARKSFORSYMBOLS", "COMBINING MARKS FOR SYMBOLS", "COMBININGMARKSFORSYMBOLS");
/** * Constant for the "Letterlike Symbols" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock LETTERLIKE_SYMBOLS = new UnicodeBlock("LETTERLIKE_SYMBOLS", "LETTERLIKE SYMBOLS", "LETTERLIKESYMBOLS");
/** * Constant for the "Number Forms" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock NUMBER_FORMS = new UnicodeBlock("NUMBER_FORMS", "NUMBER FORMS", "NUMBERFORMS");
/** * Constant for the "Arrows" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ARROWS = new UnicodeBlock("ARROWS");
/** * Constant for the "Mathematical Operators" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock MATHEMATICAL_OPERATORS = new UnicodeBlock("MATHEMATICAL_OPERATORS", "MATHEMATICAL OPERATORS", "MATHEMATICALOPERATORS");
/** * Constant for the "Miscellaneous Technical" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_TECHNICAL = new UnicodeBlock("MISCELLANEOUS_TECHNICAL", "MISCELLANEOUS TECHNICAL", "MISCELLANEOUSTECHNICAL");
/** * Constant for the "Control Pictures" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CONTROL_PICTURES = new UnicodeBlock("CONTROL_PICTURES", "CONTROL PICTURES", "CONTROLPICTURES");
/** * Constant for the "Optical Character Recognition" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock OPTICAL_CHARACTER_RECOGNITION = new UnicodeBlock("OPTICAL_CHARACTER_RECOGNITION", "OPTICAL CHARACTER RECOGNITION", "OPTICALCHARACTERRECOGNITION");
/** * Constant for the "Enclosed Alphanumerics" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ENCLOSED_ALPHANUMERICS = new UnicodeBlock("ENCLOSED_ALPHANUMERICS", "ENCLOSED ALPHANUMERICS", "ENCLOSEDALPHANUMERICS");
/** * Constant for the "Box Drawing" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock BOX_DRAWING = new UnicodeBlock("BOX_DRAWING", "BOX DRAWING", "BOXDRAWING");
/** * Constant for the "Block Elements" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock BLOCK_ELEMENTS = new UnicodeBlock("BLOCK_ELEMENTS", "BLOCK ELEMENTS", "BLOCKELEMENTS");
/** * Constant for the "Geometric Shapes" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock GEOMETRIC_SHAPES = new UnicodeBlock("GEOMETRIC_SHAPES", "GEOMETRIC SHAPES", "GEOMETRICSHAPES");
/** * Constant for the "Miscellaneous Symbols" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_SYMBOLS = new UnicodeBlock("MISCELLANEOUS_SYMBOLS", "MISCELLANEOUS SYMBOLS", "MISCELLANEOUSSYMBOLS");
/** * Constant for the "Dingbats" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock DINGBATS = new UnicodeBlock("DINGBATS");
/** * Constant for the "CJK Symbols and Punctuation" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION = new UnicodeBlock("CJK_SYMBOLS_AND_PUNCTUATION", "CJK SYMBOLS AND PUNCTUATION", "CJKSYMBOLSANDPUNCTUATION");
/** * Constant for the "Hiragana" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HIRAGANA = new UnicodeBlock("HIRAGANA");
/** * Constant for the "Katakana" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock KATAKANA = new UnicodeBlock("KATAKANA");
/** * Constant for the "Bopomofo" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock BOPOMOFO = new UnicodeBlock("BOPOMOFO");
/** * Constant for the "Hangul Compatibility Jamo" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HANGUL_COMPATIBILITY_JAMO = new UnicodeBlock("HANGUL_COMPATIBILITY_JAMO", "HANGUL COMPATIBILITY JAMO", "HANGULCOMPATIBILITYJAMO");
/** * Constant for the "Kanbun" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock KANBUN = new UnicodeBlock("KANBUN");
/** * Constant for the "Enclosed CJK Letters and Months" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS = new UnicodeBlock("ENCLOSED_CJK_LETTERS_AND_MONTHS", "ENCLOSED CJK LETTERS AND MONTHS", "ENCLOSEDCJKLETTERSANDMONTHS");
/** * Constant for the "CJK Compatibility" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CJK_COMPATIBILITY = new UnicodeBlock("CJK_COMPATIBILITY", "CJK COMPATIBILITY", "CJKCOMPATIBILITY");
/** * Constant for the "CJK Unified Ideographs" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS", "CJK UNIFIED IDEOGRAPHS", "CJKUNIFIEDIDEOGRAPHS");
/** * Constant for the "Hangul Syllables" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HANGUL_SYLLABLES = new UnicodeBlock("HANGUL_SYLLABLES", "HANGUL SYLLABLES", "HANGULSYLLABLES");
/** * Constant for the "Private Use Area" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock PRIVATE_USE_AREA = new UnicodeBlock("PRIVATE_USE_AREA", "PRIVATE USE AREA", "PRIVATEUSEAREA");
/** * Constant for the "CJK Compatibility Ideographs" Unicode character * block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS = new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS", "CJK COMPATIBILITY IDEOGRAPHS", "CJKCOMPATIBILITYIDEOGRAPHS");
/** * Constant for the "Alphabetic Presentation Forms" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ALPHABETIC_PRESENTATION_FORMS = new UnicodeBlock("ALPHABETIC_PRESENTATION_FORMS", "ALPHABETIC PRESENTATION FORMS", "ALPHABETICPRESENTATIONFORMS");
/** * Constant for the "Arabic Presentation Forms-A" Unicode character * block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ARABIC_PRESENTATION_FORMS_A = new UnicodeBlock("ARABIC_PRESENTATION_FORMS_A", "ARABIC PRESENTATION FORMS-A", "ARABICPRESENTATIONFORMS-A");
/** * Constant for the "Combining Half Marks" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock COMBINING_HALF_MARKS = new UnicodeBlock("COMBINING_HALF_MARKS", "COMBINING HALF MARKS", "COMBININGHALFMARKS");
/** * Constant for the "CJK Compatibility Forms" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock CJK_COMPATIBILITY_FORMS = new UnicodeBlock("CJK_COMPATIBILITY_FORMS", "CJK COMPATIBILITY FORMS", "CJKCOMPATIBILITYFORMS");
/** * Constant for the "Small Form Variants" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock SMALL_FORM_VARIANTS = new UnicodeBlock("SMALL_FORM_VARIANTS", "SMALL FORM VARIANTS", "SMALLFORMVARIANTS");
/** * Constant for the "Arabic Presentation Forms-B" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock ARABIC_PRESENTATION_FORMS_B = new UnicodeBlock("ARABIC_PRESENTATION_FORMS_B", "ARABIC PRESENTATION FORMS-B", "ARABICPRESENTATIONFORMS-B");
/** * Constant for the "Halfwidth and Fullwidth Forms" Unicode character * block. * @since 1.2
*/ publicstaticfinal UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS = new UnicodeBlock("HALFWIDTH_AND_FULLWIDTH_FORMS", "HALFWIDTH AND FULLWIDTH FORMS", "HALFWIDTHANDFULLWIDTHFORMS");
/** * Constant for the "Specials" Unicode character block. * @since 1.2
*/ publicstaticfinal UnicodeBlock SPECIALS = new UnicodeBlock("SPECIALS");
/** * @deprecated * Instead of {@code SURROGATES_AREA}, use {@link #HIGH_SURROGATES}, * {@link #HIGH_PRIVATE_USE_SURROGATES}, and {@link #LOW_SURROGATES}. * These constants match the block definitions of the Unicode Standard. * The {@link #of(char)} and {@link #of(int)} methods return the * standard constants.
*/
@Deprecated(since="1.5") publicstaticfinal UnicodeBlock SURROGATES_AREA = new UnicodeBlock("SURROGATES_AREA");
/** * Constant for the "Syriac" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock SYRIAC = new UnicodeBlock("SYRIAC");
/** * Constant for the "Thaana" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock THAANA = new UnicodeBlock("THAANA");
/** * Constant for the "Sinhala" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock SINHALA = new UnicodeBlock("SINHALA");
/** * Constant for the "Myanmar" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock MYANMAR = new UnicodeBlock("MYANMAR");
/** * Constant for the "Ethiopic" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock ETHIOPIC = new UnicodeBlock("ETHIOPIC");
/** * Constant for the "Cherokee" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock CHEROKEE = new UnicodeBlock("CHEROKEE");
/** * Constant for the "Unified Canadian Aboriginal Syllabics" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS", "UNIFIED CANADIAN ABORIGINAL SYLLABICS", "UNIFIEDCANADIANABORIGINALSYLLABICS");
/** * Constant for the "Ogham" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock OGHAM = new UnicodeBlock("OGHAM");
/** * Constant for the "Runic" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock RUNIC = new UnicodeBlock("RUNIC");
/** * Constant for the "Khmer" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock KHMER = new UnicodeBlock("KHMER");
/** * Constant for the "Mongolian" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock MONGOLIAN = new UnicodeBlock("MONGOLIAN");
/** * Constant for the "Braille Patterns" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock BRAILLE_PATTERNS = new UnicodeBlock("BRAILLE_PATTERNS", "BRAILLE PATTERNS", "BRAILLEPATTERNS");
/** * Constant for the "CJK Radicals Supplement" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock CJK_RADICALS_SUPPLEMENT = new UnicodeBlock("CJK_RADICALS_SUPPLEMENT", "CJK RADICALS SUPPLEMENT", "CJKRADICALSSUPPLEMENT");
/** * Constant for the "Kangxi Radicals" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock KANGXI_RADICALS = new UnicodeBlock("KANGXI_RADICALS", "KANGXI RADICALS", "KANGXIRADICALS");
/** * Constant for the "Ideographic Description Characters" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS = new UnicodeBlock("IDEOGRAPHIC_DESCRIPTION_CHARACTERS", "IDEOGRAPHIC DESCRIPTION CHARACTERS", "IDEOGRAPHICDESCRIPTIONCHARACTERS");
/** * Constant for the "Bopomofo Extended" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock BOPOMOFO_EXTENDED = new UnicodeBlock("BOPOMOFO_EXTENDED", "BOPOMOFO EXTENDED", "BOPOMOFOEXTENDED");
/** * Constant for the "CJK Unified Ideographs Extension A" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A", "CJK UNIFIED IDEOGRAPHS EXTENSION A", "CJKUNIFIEDIDEOGRAPHSEXTENSIONA");
/** * Constant for the "Yi Syllables" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock YI_SYLLABLES = new UnicodeBlock("YI_SYLLABLES", "YI SYLLABLES", "YISYLLABLES");
/** * Constant for the "Yi Radicals" Unicode character block. * @since 1.4
*/ publicstaticfinal UnicodeBlock YI_RADICALS = new UnicodeBlock("YI_RADICALS", "YI RADICALS", "YIRADICALS");
/** * Constant for the "Cyrillic Supplement" Unicode character block. * This block was previously known as the "Cyrillic Supplementary" block. * @since 1.5
*/ publicstaticfinal UnicodeBlock CYRILLIC_SUPPLEMENTARY = new UnicodeBlock("CYRILLIC_SUPPLEMENTARY", "CYRILLIC SUPPLEMENTARY", "CYRILLICSUPPLEMENTARY", "CYRILLIC SUPPLEMENT", "CYRILLICSUPPLEMENT");
/** * Constant for the "Tagalog" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock TAGALOG = new UnicodeBlock("TAGALOG");
/** * Constant for the "Hanunoo" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock HANUNOO = new UnicodeBlock("HANUNOO");
/** * Constant for the "Buhid" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock BUHID = new UnicodeBlock("BUHID");
/** * Constant for the "Tagbanwa" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock TAGBANWA = new UnicodeBlock("TAGBANWA");
/** * Constant for the "Limbu" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock LIMBU = new UnicodeBlock("LIMBU");
/** * Constant for the "Tai Le" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock TAI_LE = new UnicodeBlock("TAI_LE", "TAI LE", "TAILE");
/** * Constant for the "Khmer Symbols" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock KHMER_SYMBOLS = new UnicodeBlock("KHMER_SYMBOLS", "KHMER SYMBOLS", "KHMERSYMBOLS");
/** * Constant for the "Phonetic Extensions" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock PHONETIC_EXTENSIONS = new UnicodeBlock("PHONETIC_EXTENSIONS", "PHONETIC EXTENSIONS", "PHONETICEXTENSIONS");
/** * Constant for the "Miscellaneous Mathematical Symbols-A" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A = new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A", "MISCELLANEOUS MATHEMATICAL SYMBOLS-A", "MISCELLANEOUSMATHEMATICALSYMBOLS-A");
/** * Constant for the "Supplemental Arrows-A" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_ARROWS_A = new UnicodeBlock("SUPPLEMENTAL_ARROWS_A", "SUPPLEMENTAL ARROWS-A", "SUPPLEMENTALARROWS-A");
/** * Constant for the "Supplemental Arrows-B" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_ARROWS_B = new UnicodeBlock("SUPPLEMENTAL_ARROWS_B", "SUPPLEMENTAL ARROWS-B", "SUPPLEMENTALARROWS-B");
/** * Constant for the "Miscellaneous Mathematical Symbols-B" Unicode * character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B = new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B", "MISCELLANEOUS MATHEMATICAL SYMBOLS-B", "MISCELLANEOUSMATHEMATICALSYMBOLS-B");
/** * Constant for the "Supplemental Mathematical Operators" Unicode * character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS = new UnicodeBlock("SUPPLEMENTAL_MATHEMATICAL_OPERATORS", "SUPPLEMENTAL MATHEMATICAL OPERATORS", "SUPPLEMENTALMATHEMATICALOPERATORS");
/** * Constant for the "Miscellaneous Symbols and Arrows" Unicode character * block. * @since 1.5
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS = new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_ARROWS", "MISCELLANEOUS SYMBOLS AND ARROWS", "MISCELLANEOUSSYMBOLSANDARROWS");
/** * Constant for the "Katakana Phonetic Extensions" Unicode character * block. * @since 1.5
*/ publicstaticfinal UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS = new UnicodeBlock("KATAKANA_PHONETIC_EXTENSIONS", "KATAKANA PHONETIC EXTENSIONS", "KATAKANAPHONETICEXTENSIONS");
/** * Constant for the "Yijing Hexagram Symbols" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock YIJING_HEXAGRAM_SYMBOLS = new UnicodeBlock("YIJING_HEXAGRAM_SYMBOLS", "YIJING HEXAGRAM SYMBOLS", "YIJINGHEXAGRAMSYMBOLS");
/** * Constant for the "Variation Selectors" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock VARIATION_SELECTORS = new UnicodeBlock("VARIATION_SELECTORS", "VARIATION SELECTORS", "VARIATIONSELECTORS");
/** * Constant for the "Linear B Syllabary" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock LINEAR_B_SYLLABARY = new UnicodeBlock("LINEAR_B_SYLLABARY", "LINEAR B SYLLABARY", "LINEARBSYLLABARY");
/** * Constant for the "Linear B Ideograms" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock LINEAR_B_IDEOGRAMS = new UnicodeBlock("LINEAR_B_IDEOGRAMS", "LINEAR B IDEOGRAMS", "LINEARBIDEOGRAMS");
/** * Constant for the "Aegean Numbers" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock AEGEAN_NUMBERS = new UnicodeBlock("AEGEAN_NUMBERS", "AEGEAN NUMBERS", "AEGEANNUMBERS");
/** * Constant for the "Old Italic" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock OLD_ITALIC = new UnicodeBlock("OLD_ITALIC", "OLD ITALIC", "OLDITALIC");
/** * Constant for the "Gothic" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock GOTHIC = new UnicodeBlock("GOTHIC");
/** * Constant for the "Ugaritic" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock UGARITIC = new UnicodeBlock("UGARITIC");
/** * Constant for the "Deseret" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock DESERET = new UnicodeBlock("DESERET");
/** * Constant for the "Shavian" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SHAVIAN = new UnicodeBlock("SHAVIAN");
/** * Constant for the "Osmanya" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock OSMANYA = new UnicodeBlock("OSMANYA");
/** * Constant for the "Cypriot Syllabary" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock CYPRIOT_SYLLABARY = new UnicodeBlock("CYPRIOT_SYLLABARY", "CYPRIOT SYLLABARY", "CYPRIOTSYLLABARY");
/** * Constant for the "Byzantine Musical Symbols" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS = new UnicodeBlock("BYZANTINE_MUSICAL_SYMBOLS", "BYZANTINE MUSICAL SYMBOLS", "BYZANTINEMUSICALSYMBOLS");
/** * Constant for the "Musical Symbols" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock MUSICAL_SYMBOLS = new UnicodeBlock("MUSICAL_SYMBOLS", "MUSICAL SYMBOLS", "MUSICALSYMBOLS");
/** * Constant for the "Tai Xuan Jing Symbols" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock TAI_XUAN_JING_SYMBOLS = new UnicodeBlock("TAI_XUAN_JING_SYMBOLS", "TAI XUAN JING SYMBOLS", "TAIXUANJINGSYMBOLS");
/** * Constant for the "Mathematical Alphanumeric Symbols" Unicode * character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS = new UnicodeBlock("MATHEMATICAL_ALPHANUMERIC_SYMBOLS", "MATHEMATICAL ALPHANUMERIC SYMBOLS", "MATHEMATICALALPHANUMERICSYMBOLS");
/** * Constant for the "CJK Unified Ideographs Extension B" Unicode * character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B", "CJK UNIFIED IDEOGRAPHS EXTENSION B", "CJKUNIFIEDIDEOGRAPHSEXTENSIONB");
/** * Constant for the "CJK Compatibility Ideographs Supplement" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT = new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT", "CJK COMPATIBILITY IDEOGRAPHS SUPPLEMENT", "CJKCOMPATIBILITYIDEOGRAPHSSUPPLEMENT");
/** * Constant for the "Tags" Unicode character block. * @since 1.5
*/ publicstaticfinal UnicodeBlock TAGS = new UnicodeBlock("TAGS");
/** * Constant for the "Variation Selectors Supplement" Unicode character * block. * @since 1.5
*/ publicstaticfinal UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT = new UnicodeBlock("VARIATION_SELECTORS_SUPPLEMENT", "VARIATION SELECTORS SUPPLEMENT", "VARIATIONSELECTORSSUPPLEMENT");
/** * Constant for the "Supplementary Private Use Area-A" Unicode character * block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A = new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_A", "SUPPLEMENTARY PRIVATE USE AREA-A", "SUPPLEMENTARYPRIVATEUSEAREA-A");
/** * Constant for the "Supplementary Private Use Area-B" Unicode character * block. * @since 1.5
*/ publicstaticfinal UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B = new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_B", "SUPPLEMENTARY PRIVATE USE AREA-B", "SUPPLEMENTARYPRIVATEUSEAREA-B");
/** * Constant for the "High Surrogates" Unicode character block. * This block represents codepoint values in the high surrogate * range: U+D800 through U+DB7F * * @since 1.5
*/ publicstaticfinal UnicodeBlock HIGH_SURROGATES = new UnicodeBlock("HIGH_SURROGATES", "HIGH SURROGATES", "HIGHSURROGATES");
/** * Constant for the "High Private Use Surrogates" Unicode character * block. * This block represents codepoint values in the private use high * surrogate range: U+DB80 through U+DBFF * * @since 1.5
*/ publicstaticfinal UnicodeBlock HIGH_PRIVATE_USE_SURROGATES = new UnicodeBlock("HIGH_PRIVATE_USE_SURROGATES", "HIGH PRIVATE USE SURROGATES", "HIGHPRIVATEUSESURROGATES");
/** * Constant for the "Low Surrogates" Unicode character block. * This block represents codepoint values in the low surrogate * range: U+DC00 through U+DFFF * * @since 1.5
*/ publicstaticfinal UnicodeBlock LOW_SURROGATES = new UnicodeBlock("LOW_SURROGATES", "LOW SURROGATES", "LOWSURROGATES");
/** * Constant for the "Arabic Supplement" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ARABIC_SUPPLEMENT = new UnicodeBlock("ARABIC_SUPPLEMENT", "ARABIC SUPPLEMENT", "ARABICSUPPLEMENT");
/** * Constant for the "NKo" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock NKO = new UnicodeBlock("NKO");
/** * Constant for the "Samaritan" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock SAMARITAN = new UnicodeBlock("SAMARITAN");
/** * Constant for the "Mandaic" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MANDAIC = new UnicodeBlock("MANDAIC");
/** * Constant for the "Ethiopic Supplement" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ETHIOPIC_SUPPLEMENT = new UnicodeBlock("ETHIOPIC_SUPPLEMENT", "ETHIOPIC SUPPLEMENT", "ETHIOPICSUPPLEMENT");
/** * Constant for the "Unified Canadian Aboriginal Syllabics Extended" * Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED = new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED", "UNIFIED CANADIAN ABORIGINAL SYLLABICS EXTENDED", "UNIFIEDCANADIANABORIGINALSYLLABICSEXTENDED");
/** * Constant for the "New Tai Lue" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock NEW_TAI_LUE = new UnicodeBlock("NEW_TAI_LUE", "NEW TAI LUE", "NEWTAILUE");
/** * Constant for the "Buginese" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BUGINESE = new UnicodeBlock("BUGINESE");
/** * Constant for the "Tai Tham" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock TAI_THAM = new UnicodeBlock("TAI_THAM", "TAI THAM", "TAITHAM");
/** * Constant for the "Balinese" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BALINESE = new UnicodeBlock("BALINESE");
/** * Constant for the "Sundanese" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock SUNDANESE = new UnicodeBlock("SUNDANESE");
/** * Constant for the "Batak" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BATAK = new UnicodeBlock("BATAK");
/** * Constant for the "Lepcha" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LEPCHA = new UnicodeBlock("LEPCHA");
/** * Constant for the "Ol Chiki" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock OL_CHIKI = new UnicodeBlock("OL_CHIKI", "OL CHIKI", "OLCHIKI");
/** * Constant for the "Vedic Extensions" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock VEDIC_EXTENSIONS = new UnicodeBlock("VEDIC_EXTENSIONS", "VEDIC EXTENSIONS", "VEDICEXTENSIONS");
/** * Constant for the "Phonetic Extensions Supplement" Unicode character * block. * @since 1.7
*/ publicstaticfinal UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT = new UnicodeBlock("PHONETIC_EXTENSIONS_SUPPLEMENT", "PHONETIC EXTENSIONS SUPPLEMENT", "PHONETICEXTENSIONSSUPPLEMENT");
/** * Constant for the "Combining Diacritical Marks Supplement" Unicode * character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT = new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_SUPPLEMENT", "COMBINING DIACRITICAL MARKS SUPPLEMENT", "COMBININGDIACRITICALMARKSSUPPLEMENT");
/** * Constant for the "Glagolitic" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock GLAGOLITIC = new UnicodeBlock("GLAGOLITIC");
/** * Constant for the "Latin Extended-C" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_C = new UnicodeBlock("LATIN_EXTENDED_C", "LATIN EXTENDED-C", "LATINEXTENDED-C");
/** * Constant for the "Coptic" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock COPTIC = new UnicodeBlock("COPTIC");
/** * Constant for the "Georgian Supplement" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock GEORGIAN_SUPPLEMENT = new UnicodeBlock("GEORGIAN_SUPPLEMENT", "GEORGIAN SUPPLEMENT", "GEORGIANSUPPLEMENT");
/** * Constant for the "Tifinagh" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock TIFINAGH = new UnicodeBlock("TIFINAGH");
/** * Constant for the "Ethiopic Extended" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ETHIOPIC_EXTENDED = new UnicodeBlock("ETHIOPIC_EXTENDED", "ETHIOPIC EXTENDED", "ETHIOPICEXTENDED");
/** * Constant for the "Cyrillic Extended-A" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CYRILLIC_EXTENDED_A = new UnicodeBlock("CYRILLIC_EXTENDED_A", "CYRILLIC EXTENDED-A", "CYRILLICEXTENDED-A");
/** * Constant for the "Supplemental Punctuation" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_PUNCTUATION = new UnicodeBlock("SUPPLEMENTAL_PUNCTUATION", "SUPPLEMENTAL PUNCTUATION", "SUPPLEMENTALPUNCTUATION");
/** * Constant for the "CJK Strokes" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CJK_STROKES = new UnicodeBlock("CJK_STROKES", "CJK STROKES", "CJKSTROKES");
/** * Constant for the "Lisu" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LISU = new UnicodeBlock("LISU");
/** * Constant for the "Vai" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock VAI = new UnicodeBlock("VAI");
/** * Constant for the "Cyrillic Extended-B" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CYRILLIC_EXTENDED_B = new UnicodeBlock("CYRILLIC_EXTENDED_B", "CYRILLIC EXTENDED-B", "CYRILLICEXTENDED-B");
/** * Constant for the "Bamum" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BAMUM = new UnicodeBlock("BAMUM");
/** * Constant for the "Modifier Tone Letters" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MODIFIER_TONE_LETTERS = new UnicodeBlock("MODIFIER_TONE_LETTERS", "MODIFIER TONE LETTERS", "MODIFIERTONELETTERS");
/** * Constant for the "Latin Extended-D" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_D = new UnicodeBlock("LATIN_EXTENDED_D", "LATIN EXTENDED-D", "LATINEXTENDED-D");
/** * Constant for the "Syloti Nagri" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock SYLOTI_NAGRI = new UnicodeBlock("SYLOTI_NAGRI", "SYLOTI NAGRI", "SYLOTINAGRI");
/** * Constant for the "Common Indic Number Forms" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock COMMON_INDIC_NUMBER_FORMS = new UnicodeBlock("COMMON_INDIC_NUMBER_FORMS", "COMMON INDIC NUMBER FORMS", "COMMONINDICNUMBERFORMS");
/** * Constant for the "Phags-pa" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock PHAGS_PA = new UnicodeBlock("PHAGS_PA", "PHAGS-PA");
/** * Constant for the "Saurashtra" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock SAURASHTRA = new UnicodeBlock("SAURASHTRA");
/** * Constant for the "Devanagari Extended" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock DEVANAGARI_EXTENDED = new UnicodeBlock("DEVANAGARI_EXTENDED", "DEVANAGARI EXTENDED", "DEVANAGARIEXTENDED");
/** * Constant for the "Kayah Li" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock KAYAH_LI = new UnicodeBlock("KAYAH_LI", "KAYAH LI", "KAYAHLI");
/** * Constant for the "Rejang" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock REJANG = new UnicodeBlock("REJANG");
/** * Constant for the "Hangul Jamo Extended-A" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock HANGUL_JAMO_EXTENDED_A = new UnicodeBlock("HANGUL_JAMO_EXTENDED_A", "HANGUL JAMO EXTENDED-A", "HANGULJAMOEXTENDED-A");
/** * Constant for the "Javanese" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock JAVANESE = new UnicodeBlock("JAVANESE");
/** * Constant for the "Cham" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CHAM = new UnicodeBlock("CHAM");
/** * Constant for the "Myanmar Extended-A" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MYANMAR_EXTENDED_A = new UnicodeBlock("MYANMAR_EXTENDED_A", "MYANMAR EXTENDED-A", "MYANMAREXTENDED-A");
/** * Constant for the "Tai Viet" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock TAI_VIET = new UnicodeBlock("TAI_VIET", "TAI VIET", "TAIVIET");
/** * Constant for the "Ethiopic Extended-A" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ETHIOPIC_EXTENDED_A = new UnicodeBlock("ETHIOPIC_EXTENDED_A", "ETHIOPIC EXTENDED-A", "ETHIOPICEXTENDED-A");
/** * Constant for the "Meetei Mayek" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MEETEI_MAYEK = new UnicodeBlock("MEETEI_MAYEK", "MEETEI MAYEK", "MEETEIMAYEK");
/** * Constant for the "Hangul Jamo Extended-B" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock HANGUL_JAMO_EXTENDED_B = new UnicodeBlock("HANGUL_JAMO_EXTENDED_B", "HANGUL JAMO EXTENDED-B", "HANGULJAMOEXTENDED-B");
/** * Constant for the "Vertical Forms" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock VERTICAL_FORMS = new UnicodeBlock("VERTICAL_FORMS", "VERTICAL FORMS", "VERTICALFORMS");
/** * Constant for the "Ancient Greek Numbers" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ANCIENT_GREEK_NUMBERS = new UnicodeBlock("ANCIENT_GREEK_NUMBERS", "ANCIENT GREEK NUMBERS", "ANCIENTGREEKNUMBERS");
/** * Constant for the "Ancient Symbols" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ANCIENT_SYMBOLS = new UnicodeBlock("ANCIENT_SYMBOLS", "ANCIENT SYMBOLS", "ANCIENTSYMBOLS");
/** * Constant for the "Phaistos Disc" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock PHAISTOS_DISC = new UnicodeBlock("PHAISTOS_DISC", "PHAISTOS DISC", "PHAISTOSDISC");
/** * Constant for the "Lycian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LYCIAN = new UnicodeBlock("LYCIAN");
/** * Constant for the "Carian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CARIAN = new UnicodeBlock("CARIAN");
/** * Constant for the "Old Persian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock OLD_PERSIAN = new UnicodeBlock("OLD_PERSIAN", "OLD PERSIAN", "OLDPERSIAN");
/** * Constant for the "Imperial Aramaic" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock IMPERIAL_ARAMAIC = new UnicodeBlock("IMPERIAL_ARAMAIC", "IMPERIAL ARAMAIC", "IMPERIALARAMAIC");
/** * Constant for the "Phoenician" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock PHOENICIAN = new UnicodeBlock("PHOENICIAN");
/** * Constant for the "Lydian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock LYDIAN = new UnicodeBlock("LYDIAN");
/** * Constant for the "Kharoshthi" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock KHAROSHTHI = new UnicodeBlock("KHAROSHTHI");
/** * Constant for the "Old South Arabian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock OLD_SOUTH_ARABIAN = new UnicodeBlock("OLD_SOUTH_ARABIAN", "OLD SOUTH ARABIAN", "OLDSOUTHARABIAN");
/** * Constant for the "Avestan" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock AVESTAN = new UnicodeBlock("AVESTAN");
/** * Constant for the "Inscriptional Parthian" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock INSCRIPTIONAL_PARTHIAN = new UnicodeBlock("INSCRIPTIONAL_PARTHIAN", "INSCRIPTIONAL PARTHIAN", "INSCRIPTIONALPARTHIAN");
/** * Constant for the "Inscriptional Pahlavi" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock INSCRIPTIONAL_PAHLAVI = new UnicodeBlock("INSCRIPTIONAL_PAHLAVI", "INSCRIPTIONAL PAHLAVI", "INSCRIPTIONALPAHLAVI");
/** * Constant for the "Old Turkic" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock OLD_TURKIC = new UnicodeBlock("OLD_TURKIC", "OLD TURKIC", "OLDTURKIC");
/** * Constant for the "Rumi Numeral Symbols" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock RUMI_NUMERAL_SYMBOLS = new UnicodeBlock("RUMI_NUMERAL_SYMBOLS", "RUMI NUMERAL SYMBOLS", "RUMINUMERALSYMBOLS");
/** * Constant for the "Brahmi" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BRAHMI = new UnicodeBlock("BRAHMI");
/** * Constant for the "Kaithi" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock KAITHI = new UnicodeBlock("KAITHI");
/** * Constant for the "Cuneiform" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CUNEIFORM = new UnicodeBlock("CUNEIFORM");
/** * Constant for the "Cuneiform Numbers and Punctuation" Unicode * character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION = new UnicodeBlock("CUNEIFORM_NUMBERS_AND_PUNCTUATION", "CUNEIFORM NUMBERS AND PUNCTUATION", "CUNEIFORMNUMBERSANDPUNCTUATION");
/** * Constant for the "Egyptian Hieroglyphs" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock EGYPTIAN_HIEROGLYPHS = new UnicodeBlock("EGYPTIAN_HIEROGLYPHS", "EGYPTIAN HIEROGLYPHS", "EGYPTIANHIEROGLYPHS");
/** * Constant for the "Bamum Supplement" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock BAMUM_SUPPLEMENT = new UnicodeBlock("BAMUM_SUPPLEMENT", "BAMUM SUPPLEMENT", "BAMUMSUPPLEMENT");
/** * Constant for the "Kana Supplement" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock KANA_SUPPLEMENT = new UnicodeBlock("KANA_SUPPLEMENT", "KANA SUPPLEMENT", "KANASUPPLEMENT");
/** * Constant for the "Ancient Greek Musical Notation" Unicode character * block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION = new UnicodeBlock("ANCIENT_GREEK_MUSICAL_NOTATION", "ANCIENT GREEK MUSICAL NOTATION", "ANCIENTGREEKMUSICALNOTATION");
/** * Constant for the "Counting Rod Numerals" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock COUNTING_ROD_NUMERALS = new UnicodeBlock("COUNTING_ROD_NUMERALS", "COUNTING ROD NUMERALS", "COUNTINGRODNUMERALS");
/** * Constant for the "Mahjong Tiles" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MAHJONG_TILES = new UnicodeBlock("MAHJONG_TILES", "MAHJONG TILES", "MAHJONGTILES");
/** * Constant for the "Domino Tiles" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock DOMINO_TILES = new UnicodeBlock("DOMINO_TILES", "DOMINO TILES", "DOMINOTILES");
/** * Constant for the "Playing Cards" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock PLAYING_CARDS = new UnicodeBlock("PLAYING_CARDS", "PLAYING CARDS", "PLAYINGCARDS");
/** * Constant for the "Enclosed Alphanumeric Supplement" Unicode character * block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT = new UnicodeBlock("ENCLOSED_ALPHANUMERIC_SUPPLEMENT", "ENCLOSED ALPHANUMERIC SUPPLEMENT", "ENCLOSEDALPHANUMERICSUPPLEMENT");
/** * Constant for the "Enclosed Ideographic Supplement" Unicode character * block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT = new UnicodeBlock("ENCLOSED_IDEOGRAPHIC_SUPPLEMENT", "ENCLOSED IDEOGRAPHIC SUPPLEMENT", "ENCLOSEDIDEOGRAPHICSUPPLEMENT");
/** * Constant for the "Miscellaneous Symbols And Pictographs" Unicode * character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS = new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS", "MISCELLANEOUS SYMBOLS AND PICTOGRAPHS", "MISCELLANEOUSSYMBOLSANDPICTOGRAPHS");
/** * Constant for the "Emoticons" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock EMOTICONS = new UnicodeBlock("EMOTICONS");
/** * Constant for the "Transport And Map Symbols" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS = new UnicodeBlock("TRANSPORT_AND_MAP_SYMBOLS", "TRANSPORT AND MAP SYMBOLS", "TRANSPORTANDMAPSYMBOLS");
/** * Constant for the "Alchemical Symbols" Unicode character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock ALCHEMICAL_SYMBOLS = new UnicodeBlock("ALCHEMICAL_SYMBOLS", "ALCHEMICAL SYMBOLS", "ALCHEMICALSYMBOLS");
/** * Constant for the "CJK Unified Ideographs Extension C" Unicode * character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C", "CJK UNIFIED IDEOGRAPHS EXTENSION C", "CJKUNIFIEDIDEOGRAPHSEXTENSIONC");
/** * Constant for the "CJK Unified Ideographs Extension D" Unicode * character block. * @since 1.7
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D", "CJK UNIFIED IDEOGRAPHS EXTENSION D", "CJKUNIFIEDIDEOGRAPHSEXTENSIOND");
/** * Constant for the "Arabic Extended-A" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock ARABIC_EXTENDED_A = new UnicodeBlock("ARABIC_EXTENDED_A", "ARABIC EXTENDED-A", "ARABICEXTENDED-A");
/** * Constant for the "Sundanese Supplement" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock SUNDANESE_SUPPLEMENT = new UnicodeBlock("SUNDANESE_SUPPLEMENT", "SUNDANESE SUPPLEMENT", "SUNDANESESUPPLEMENT");
/** * Constant for the "Meetei Mayek Extensions" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock MEETEI_MAYEK_EXTENSIONS = new UnicodeBlock("MEETEI_MAYEK_EXTENSIONS", "MEETEI MAYEK EXTENSIONS", "MEETEIMAYEKEXTENSIONS");
/** * Constant for the "Meroitic Hieroglyphs" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock MEROITIC_HIEROGLYPHS = new UnicodeBlock("MEROITIC_HIEROGLYPHS", "MEROITIC HIEROGLYPHS", "MEROITICHIEROGLYPHS");
/** * Constant for the "Meroitic Cursive" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock MEROITIC_CURSIVE = new UnicodeBlock("MEROITIC_CURSIVE", "MEROITIC CURSIVE", "MEROITICCURSIVE");
/** * Constant for the "Sora Sompeng" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock SORA_SOMPENG = new UnicodeBlock("SORA_SOMPENG", "SORA SOMPENG", "SORASOMPENG");
/** * Constant for the "Chakma" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock CHAKMA = new UnicodeBlock("CHAKMA");
/** * Constant for the "Sharada" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock SHARADA = new UnicodeBlock("SHARADA");
/** * Constant for the "Takri" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock TAKRI = new UnicodeBlock("TAKRI");
/** * Constant for the "Miao" Unicode character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock MIAO = new UnicodeBlock("MIAO");
/** * Constant for the "Arabic Mathematical Alphabetic Symbols" Unicode * character block. * @since 1.8
*/ publicstaticfinal UnicodeBlock ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS = new UnicodeBlock("ARABIC_MATHEMATICAL_ALPHABETIC_SYMBOLS", "ARABIC MATHEMATICAL ALPHABETIC SYMBOLS", "ARABICMATHEMATICALALPHABETICSYMBOLS");
/** * Constant for the "Combining Diacritical Marks Extended" Unicode * character block. * @since 9
*/ publicstaticfinal UnicodeBlock COMBINING_DIACRITICAL_MARKS_EXTENDED = new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_EXTENDED", "COMBINING DIACRITICAL MARKS EXTENDED", "COMBININGDIACRITICALMARKSEXTENDED");
/** * Constant for the "Myanmar Extended-B" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MYANMAR_EXTENDED_B = new UnicodeBlock("MYANMAR_EXTENDED_B", "MYANMAR EXTENDED-B", "MYANMAREXTENDED-B");
/** * Constant for the "Latin Extended-E" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_E = new UnicodeBlock("LATIN_EXTENDED_E", "LATIN EXTENDED-E", "LATINEXTENDED-E");
/** * Constant for the "Coptic Epact Numbers" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock COPTIC_EPACT_NUMBERS = new UnicodeBlock("COPTIC_EPACT_NUMBERS", "COPTIC EPACT NUMBERS", "COPTICEPACTNUMBERS");
/** * Constant for the "Old Permic" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock OLD_PERMIC = new UnicodeBlock("OLD_PERMIC", "OLD PERMIC", "OLDPERMIC");
/** * Constant for the "Elbasan" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock ELBASAN = new UnicodeBlock("ELBASAN");
/** * Constant for the "Caucasian Albanian" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock CAUCASIAN_ALBANIAN = new UnicodeBlock("CAUCASIAN_ALBANIAN", "CAUCASIAN ALBANIAN", "CAUCASIANALBANIAN");
/** * Constant for the "Linear A" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock LINEAR_A = new UnicodeBlock("LINEAR_A", "LINEAR A", "LINEARA");
/** * Constant for the "Palmyrene" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock PALMYRENE = new UnicodeBlock("PALMYRENE");
/** * Constant for the "Nabataean" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock NABATAEAN = new UnicodeBlock("NABATAEAN");
/** * Constant for the "Old North Arabian" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock OLD_NORTH_ARABIAN = new UnicodeBlock("OLD_NORTH_ARABIAN", "OLD NORTH ARABIAN", "OLDNORTHARABIAN");
/** * Constant for the "Manichaean" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MANICHAEAN = new UnicodeBlock("MANICHAEAN");
/** * Constant for the "Psalter Pahlavi" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock PSALTER_PAHLAVI = new UnicodeBlock("PSALTER_PAHLAVI", "PSALTER PAHLAVI", "PSALTERPAHLAVI");
/** * Constant for the "Mahajani" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MAHAJANI = new UnicodeBlock("MAHAJANI");
/** * Constant for the "Sinhala Archaic Numbers" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock SINHALA_ARCHAIC_NUMBERS = new UnicodeBlock("SINHALA_ARCHAIC_NUMBERS", "SINHALA ARCHAIC NUMBERS", "SINHALAARCHAICNUMBERS");
/** * Constant for the "Khojki" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock KHOJKI = new UnicodeBlock("KHOJKI");
/** * Constant for the "Khudawadi" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock KHUDAWADI = new UnicodeBlock("KHUDAWADI");
/** * Constant for the "Grantha" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock GRANTHA = new UnicodeBlock("GRANTHA");
/** * Constant for the "Tirhuta" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock TIRHUTA = new UnicodeBlock("TIRHUTA");
/** * Constant for the "Siddham" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock SIDDHAM = new UnicodeBlock("SIDDHAM");
/** * Constant for the "Modi" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MODI = new UnicodeBlock("MODI");
/** * Constant for the "Warang Citi" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock WARANG_CITI = new UnicodeBlock("WARANG_CITI", "WARANG CITI", "WARANGCITI");
/** * Constant for the "Pau Cin Hau" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock PAU_CIN_HAU = new UnicodeBlock("PAU_CIN_HAU", "PAU CIN HAU", "PAUCINHAU");
/** * Constant for the "Mro" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MRO = new UnicodeBlock("MRO");
/** * Constant for the "Bassa Vah" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock BASSA_VAH = new UnicodeBlock("BASSA_VAH", "BASSA VAH", "BASSAVAH");
/** * Constant for the "Pahawh Hmong" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock PAHAWH_HMONG = new UnicodeBlock("PAHAWH_HMONG", "PAHAWH HMONG", "PAHAWHHMONG");
/** * Constant for the "Duployan" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock DUPLOYAN = new UnicodeBlock("DUPLOYAN");
/** * Constant for the "Shorthand Format Controls" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock SHORTHAND_FORMAT_CONTROLS = new UnicodeBlock("SHORTHAND_FORMAT_CONTROLS", "SHORTHAND FORMAT CONTROLS", "SHORTHANDFORMATCONTROLS");
/** * Constant for the "Mende Kikakui" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MENDE_KIKAKUI = new UnicodeBlock("MENDE_KIKAKUI", "MENDE KIKAKUI", "MENDEKIKAKUI");
/** * Constant for the "Ornamental Dingbats" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock ORNAMENTAL_DINGBATS = new UnicodeBlock("ORNAMENTAL_DINGBATS", "ORNAMENTAL DINGBATS", "ORNAMENTALDINGBATS");
/** * Constant for the "Geometric Shapes Extended" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock GEOMETRIC_SHAPES_EXTENDED = new UnicodeBlock("GEOMETRIC_SHAPES_EXTENDED", "GEOMETRIC SHAPES EXTENDED", "GEOMETRICSHAPESEXTENDED");
/** * Constant for the "Supplemental Arrows-C" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_ARROWS_C = new UnicodeBlock("SUPPLEMENTAL_ARROWS_C", "SUPPLEMENTAL ARROWS-C", "SUPPLEMENTALARROWS-C");
/** * Constant for the "Cherokee Supplement" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock CHEROKEE_SUPPLEMENT = new UnicodeBlock("CHEROKEE_SUPPLEMENT", "CHEROKEE SUPPLEMENT", "CHEROKEESUPPLEMENT");
/** * Constant for the "Hatran" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock HATRAN = new UnicodeBlock("HATRAN");
/** * Constant for the "Old Hungarian" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock OLD_HUNGARIAN = new UnicodeBlock("OLD_HUNGARIAN", "OLD HUNGARIAN", "OLDHUNGARIAN");
/** * Constant for the "Multani" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock MULTANI = new UnicodeBlock("MULTANI");
/** * Constant for the "Ahom" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock AHOM = new UnicodeBlock("AHOM");
/** * Constant for the "Early Dynastic Cuneiform" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock EARLY_DYNASTIC_CUNEIFORM = new UnicodeBlock("EARLY_DYNASTIC_CUNEIFORM", "EARLY DYNASTIC CUNEIFORM", "EARLYDYNASTICCUNEIFORM");
/** * Constant for the "Anatolian Hieroglyphs" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock ANATOLIAN_HIEROGLYPHS = new UnicodeBlock("ANATOLIAN_HIEROGLYPHS", "ANATOLIAN HIEROGLYPHS", "ANATOLIANHIEROGLYPHS");
/** * Constant for the "Sutton SignWriting" Unicode character block. * @since 9
*/ publicstaticfinal UnicodeBlock SUTTON_SIGNWRITING = new UnicodeBlock("SUTTON_SIGNWRITING", "SUTTON SIGNWRITING", "SUTTONSIGNWRITING");
/** * Constant for the "Supplemental Symbols and Pictographs" Unicode * character block. * @since 9
*/ publicstaticfinal UnicodeBlock SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS = new UnicodeBlock("SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS", "SUPPLEMENTAL SYMBOLS AND PICTOGRAPHS", "SUPPLEMENTALSYMBOLSANDPICTOGRAPHS");
/** * Constant for the "CJK Unified Ideographs Extension E" Unicode * character block. * @since 9
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_E", "CJK UNIFIED IDEOGRAPHS EXTENSION E", "CJKUNIFIEDIDEOGRAPHSEXTENSIONE");
/** * Constant for the "Syriac Supplement" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock SYRIAC_SUPPLEMENT = new UnicodeBlock("SYRIAC_SUPPLEMENT", "SYRIAC SUPPLEMENT", "SYRIACSUPPLEMENT");
/** * Constant for the "Cyrillic Extended-C" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock CYRILLIC_EXTENDED_C = new UnicodeBlock("CYRILLIC_EXTENDED_C", "CYRILLIC EXTENDED-C", "CYRILLICEXTENDED-C");
/** * Constant for the "Osage" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock OSAGE = new UnicodeBlock("OSAGE");
/** * Constant for the "Newa" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock NEWA = new UnicodeBlock("NEWA");
/** * Constant for the "Mongolian Supplement" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock MONGOLIAN_SUPPLEMENT = new UnicodeBlock("MONGOLIAN_SUPPLEMENT", "MONGOLIAN SUPPLEMENT", "MONGOLIANSUPPLEMENT");
/** * Constant for the "Marchen" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock MARCHEN = new UnicodeBlock("MARCHEN");
/** * Constant for the "Ideographic Symbols and Punctuation" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION = new UnicodeBlock("IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION", "IDEOGRAPHIC SYMBOLS AND PUNCTUATION", "IDEOGRAPHICSYMBOLSANDPUNCTUATION");
/** * Constant for the "Tangut" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock TANGUT = new UnicodeBlock("TANGUT");
/** * Constant for the "Tangut Components" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock TANGUT_COMPONENTS = new UnicodeBlock("TANGUT_COMPONENTS", "TANGUT COMPONENTS", "TANGUTCOMPONENTS");
/** * Constant for the "Kana Extended-A" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock KANA_EXTENDED_A = new UnicodeBlock("KANA_EXTENDED_A", "KANA EXTENDED-A", "KANAEXTENDED-A"); /** * Constant for the "Glagolitic Supplement" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock GLAGOLITIC_SUPPLEMENT = new UnicodeBlock("GLAGOLITIC_SUPPLEMENT", "GLAGOLITIC SUPPLEMENT", "GLAGOLITICSUPPLEMENT"); /** * Constant for the "Adlam" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock ADLAM = new UnicodeBlock("ADLAM");
/** * Constant for the "Masaram Gondi" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock MASARAM_GONDI = new UnicodeBlock("MASARAM_GONDI", "MASARAM GONDI", "MASARAMGONDI");
/** * Constant for the "Zanabazar Square" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock ZANABAZAR_SQUARE = new UnicodeBlock("ZANABAZAR_SQUARE", "ZANABAZAR SQUARE", "ZANABAZARSQUARE");
/** * Constant for the "Nushu" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock NUSHU = new UnicodeBlock("NUSHU");
/** * Constant for the "Soyombo" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock SOYOMBO = new UnicodeBlock("SOYOMBO");
/** * Constant for the "Bhaiksuki" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock BHAIKSUKI = new UnicodeBlock("BHAIKSUKI");
/** * Constant for the "CJK Unified Ideographs Extension F" Unicode * character block. * @since 11
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F", "CJK UNIFIED IDEOGRAPHS EXTENSION F", "CJKUNIFIEDIDEOGRAPHSEXTENSIONF"); /** * Constant for the "Georgian Extended" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock GEORGIAN_EXTENDED = new UnicodeBlock("GEORGIAN_EXTENDED", "GEORGIAN EXTENDED", "GEORGIANEXTENDED");
/** * Constant for the "Hanifi Rohingya" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock HANIFI_ROHINGYA = new UnicodeBlock("HANIFI_ROHINGYA", "HANIFI ROHINGYA", "HANIFIROHINGYA");
/** * Constant for the "Old Sogdian" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock OLD_SOGDIAN = new UnicodeBlock("OLD_SOGDIAN", "OLD SOGDIAN", "OLDSOGDIAN");
/** * Constant for the "Sogdian" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock SOGDIAN = new UnicodeBlock("SOGDIAN");
/** * Constant for the "Dogra" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock DOGRA = new UnicodeBlock("DOGRA");
/** * Constant for the "Gunjala Gondi" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock GUNJALA_GONDI = new UnicodeBlock("GUNJALA_GONDI", "GUNJALA GONDI", "GUNJALAGONDI");
/** * Constant for the "Makasar" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock MAKASAR = new UnicodeBlock("MAKASAR");
/** * Constant for the "Medefaidrin" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock MEDEFAIDRIN = new UnicodeBlock("MEDEFAIDRIN");
/** * Constant for the "Mayan Numerals" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock MAYAN_NUMERALS = new UnicodeBlock("MAYAN_NUMERALS", "MAYAN NUMERALS", "MAYANNUMERALS");
/** * Constant for the "Indic Siyaq Numbers" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock INDIC_SIYAQ_NUMBERS = new UnicodeBlock("INDIC_SIYAQ_NUMBERS", "INDIC SIYAQ NUMBERS", "INDICSIYAQNUMBERS");
/** * Constant for the "Chess Symbols" Unicode * character block. * @since 12
*/ publicstaticfinal UnicodeBlock CHESS_SYMBOLS = new UnicodeBlock("CHESS_SYMBOLS", "CHESS SYMBOLS", "CHESSSYMBOLS");
/** * Constant for the "Elymaic" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock ELYMAIC = new UnicodeBlock("ELYMAIC");
/** * Constant for the "Nandinagari" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock NANDINAGARI = new UnicodeBlock("NANDINAGARI");
/** * Constant for the "Tamil Supplement" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock TAMIL_SUPPLEMENT = new UnicodeBlock("TAMIL_SUPPLEMENT", "TAMIL SUPPLEMENT", "TAMILSUPPLEMENT");
/** * Constant for the "Egyptian Hieroglyph Format Controls" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS = new UnicodeBlock("EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS", "EGYPTIAN HIEROGLYPH FORMAT CONTROLS", "EGYPTIANHIEROGLYPHFORMATCONTROLS");
/** * Constant for the "Small Kana Extension" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock SMALL_KANA_EXTENSION = new UnicodeBlock("SMALL_KANA_EXTENSION", "SMALL KANA EXTENSION", "SMALLKANAEXTENSION");
/** * Constant for the "Nyiakeng Puachue Hmong" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock NYIAKENG_PUACHUE_HMONG = new UnicodeBlock("NYIAKENG_PUACHUE_HMONG", "NYIAKENG PUACHUE HMONG", "NYIAKENGPUACHUEHMONG");
/** * Constant for the "Wancho" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock WANCHO = new UnicodeBlock("WANCHO");
/** * Constant for the "Ottoman Siyaq Numbers" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock OTTOMAN_SIYAQ_NUMBERS = new UnicodeBlock("OTTOMAN_SIYAQ_NUMBERS", "OTTOMAN SIYAQ NUMBERS", "OTTOMANSIYAQNUMBERS");
/** * Constant for the "Symbols and Pictographs Extended-A" Unicode * character block. * @since 13
*/ publicstaticfinal UnicodeBlock SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A = new UnicodeBlock("SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A", "SYMBOLS AND PICTOGRAPHS EXTENDED-A", "SYMBOLSANDPICTOGRAPHSEXTENDED-A");
/** * Constant for the "Yezidi" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock YEZIDI = new UnicodeBlock("YEZIDI");
/** * Constant for the "Chorasmian" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock CHORASMIAN = new UnicodeBlock("CHORASMIAN");
/** * Constant for the "Dives Akuru" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock DIVES_AKURU = new UnicodeBlock("DIVES_AKURU", "DIVES AKURU", "DIVESAKURU");
/** * Constant for the "Lisu Supplement" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock LISU_SUPPLEMENT = new UnicodeBlock("LISU_SUPPLEMENT", "LISU SUPPLEMENT", "LISUSUPPLEMENT");
/** * Constant for the "Khitan Small Script" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock KHITAN_SMALL_SCRIPT = new UnicodeBlock("KHITAN_SMALL_SCRIPT", "KHITAN SMALL SCRIPT", "KHITANSMALLSCRIPT");
/** * Constant for the "Tangut Supplement" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock TANGUT_SUPPLEMENT = new UnicodeBlock("TANGUT_SUPPLEMENT", "TANGUT SUPPLEMENT", "TANGUTSUPPLEMENT");
/** * Constant for the "Symbols for Legacy Computing" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock SYMBOLS_FOR_LEGACY_COMPUTING = new UnicodeBlock("SYMBOLS_FOR_LEGACY_COMPUTING", "SYMBOLS FOR LEGACY COMPUTING", "SYMBOLSFORLEGACYCOMPUTING");
/** * Constant for the "CJK Unified Ideographs Extension G" Unicode * character block. * @since 15
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_G", "CJK UNIFIED IDEOGRAPHS EXTENSION G", "CJKUNIFIEDIDEOGRAPHSEXTENSIONG");
/** * Constant for the "Arabic Extended-B" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock ARABIC_EXTENDED_B = new UnicodeBlock("ARABIC_EXTENDED_B", "ARABIC EXTENDED-B", "ARABICEXTENDED-B");
/** * Constant for the "Vithkuqi" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock VITHKUQI = new UnicodeBlock("VITHKUQI");
/** * Constant for the "Latin Extended-F" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_F = new UnicodeBlock("LATIN_EXTENDED_F", "LATIN EXTENDED-F", "LATINEXTENDED-F");
/** * Constant for the "Old Uyghur" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock OLD_UYGHUR = new UnicodeBlock("OLD_UYGHUR", "OLD UYGHUR", "OLDUYGHUR");
/** * Constant for the "Unified Canadian Aboriginal Syllabics Extended-A" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A = new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED_A", "UNIFIED CANADIAN ABORIGINAL SYLLABICS EXTENDED-A", "UNIFIEDCANADIANABORIGINALSYLLABICSEXTENDED-A");
/** * Constant for the "Cypro-Minoan" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock CYPRO_MINOAN = new UnicodeBlock("CYPRO_MINOAN", "CYPRO-MINOAN", "CYPRO-MINOAN");
/** * Constant for the "Tangsa" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock TANGSA = new UnicodeBlock("TANGSA");
/** * Constant for the "Kana Extended-B" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock KANA_EXTENDED_B = new UnicodeBlock("KANA_EXTENDED_B", "KANA EXTENDED-B", "KANAEXTENDED-B");
/** * Constant for the "Znamenny Musical Notation" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock ZNAMENNY_MUSICAL_NOTATION = new UnicodeBlock("ZNAMENNY_MUSICAL_NOTATION", "ZNAMENNY MUSICAL NOTATION", "ZNAMENNYMUSICALNOTATION");
/** * Constant for the "Latin Extended-G" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock LATIN_EXTENDED_G = new UnicodeBlock("LATIN_EXTENDED_G", "LATIN EXTENDED-G", "LATINEXTENDED-G");
/** * Constant for the "Toto" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock TOTO = new UnicodeBlock("TOTO");
/** * Constant for the "Ethiopic Extended-B" Unicode * character block. * @since 19
*/ publicstaticfinal UnicodeBlock ETHIOPIC_EXTENDED_B = new UnicodeBlock("ETHIOPIC_EXTENDED_B", "ETHIOPIC EXTENDED-B", "ETHIOPICEXTENDED-B");
/** * Constant for the "Arabic Extended-C" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock ARABIC_EXTENDED_C = new UnicodeBlock("ARABIC_EXTENDED_C", "ARABIC EXTENDED-C", "ARABICEXTENDED-C");
/** * Constant for the "Devanagari Extended-A" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock DEVANAGARI_EXTENDED_A = new UnicodeBlock("DEVANAGARI_EXTENDED_A", "DEVANAGARI EXTENDED-A", "DEVANAGARIEXTENDED-A");
/** * Constant for the "Kawi" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock KAWI = new UnicodeBlock("KAWI");
/** * Constant for the "Kaktovik Numerals" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock KAKTOVIK_NUMERALS = new UnicodeBlock("KAKTOVIK_NUMERALS", "KAKTOVIK NUMERALS", "KAKTOVIKNUMERALS");
/** * Constant for the "Cyrillic Extended-D" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock CYRILLIC_EXTENDED_D = new UnicodeBlock("CYRILLIC_EXTENDED_D", "CYRILLIC EXTENDED-D", "CYRILLICEXTENDED-D");
/** * Constant for the "Nag Mundari" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock NAG_MUNDARI = new UnicodeBlock("NAG_MUNDARI", "NAG MUNDARI", "NAGMUNDARI");
/** * Constant for the "CJK Unified Ideographs Extension H" Unicode * character block. * @since 20
*/ publicstaticfinal UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H = new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_H", "CJK UNIFIED IDEOGRAPHS EXTENSION H", "CJKUNIFIEDIDEOGRAPHSEXTENSIONH");
/** * Returns the object representing the Unicode block containing the * given character, or {@code null} if the character is not a * member of a defined block. * * <p><b>Note:</b> This method cannot handle * <a href="Character.html#supplementary"> supplementary * characters</a>. To support all Unicode characters, including * supplementary characters, use the {@link #of(int)} method. * * @param c The character in question * @return The {@code UnicodeBlock} instance representing the * Unicode block of which this character is a member, or * {@code null} if the character is not a member of any * Unicode block
*/ publicstatic UnicodeBlock of(char c) { return of((int)c);
}
/** * Returns the object representing the Unicode block * containing the given character (Unicode code point), or * {@code null} if the character is not a member of a * defined block. * * @param codePoint the character (Unicode code point) in question. * @return The {@code UnicodeBlock} instance representing the * Unicode block of which this character is a member, or * {@code null} if the character is not a member of any * Unicode block * @throws IllegalArgumentException if the specified * {@code codePoint} is an invalid Unicode code point. * @see Character#isValidCodePoint(int) * @since 1.5
*/ publicstatic UnicodeBlock of(int codePoint) { if (!isValidCodePoint(codePoint)) { thrownew IllegalArgumentException(
String.format("Not a valid Unicode code point: 0x%X", codePoint));
}
int top, bottom, current;
bottom = 0;
top = blockStarts.length;
current = top/2;
// invariant: top > current >= bottom && codePoint >= unicodeBlockStarts[bottom] while (top - bottom > 1) { if (codePoint >= blockStarts[current]) {
bottom = current;
} else {
top = current;
}
current = (top + bottom) / 2;
} return blocks[current];
}
/** * Returns the UnicodeBlock with the given name. Block * names are determined by The Unicode Standard. The file * {@code Blocks.txt} defines blocks for a particular * version of the standard. The {@link Character} class specifies * the version of the standard that it supports. * <p> * This method accepts block names in the following forms: * <ol> * <li> Canonical block names as defined by the Unicode Standard. * For example, the standard defines a "Basic Latin" block. Therefore, this * method accepts "Basic Latin" as a valid block name. The documentation of * each UnicodeBlock provides the canonical name. * <li>Canonical block names with all spaces removed. For example, "BasicLatin" * is a valid block name for the "Basic Latin" block. * <li>The text representation of each constant UnicodeBlock identifier. * For example, this method will return the {@link #BASIC_LATIN} block if * provided with the "BASIC_LATIN" name. This form replaces all spaces and * hyphens in the canonical name with underscores. * </ol> * Finally, character case is ignored for all of the valid block name forms. * For example, "BASIC_LATIN" and "basic_latin" are both valid block names. * The en_US locale's case mapping rules are used to provide case-insensitive * string comparisons for block name validation. * <p> * If the Unicode Standard changes block names, both the previous and * current names will be accepted. * * @param blockName A {@code UnicodeBlock} name. * @return The {@code UnicodeBlock} instance identified * by {@code blockName} * @throws IllegalArgumentException if {@code blockName} is an * invalid name * @throws NullPointerException if {@code blockName} is null * @since 1.5
*/ publicstaticfinal UnicodeBlock forName(String blockName) {
UnicodeBlock block = map.get(blockName.toUpperCase(Locale.US)); if (block == null) { thrownew IllegalArgumentException("Not a valid block name: "
+ blockName);
} return block;
}
}
/** * A family of character subsets representing the character scripts * defined in the <a href="http://www.unicode.org/reports/tr24/"> * <i>Unicode Standard Annex #24: Script Names</i></a>. Every Unicode * character is assigned to a single Unicode script, either a specific * script, such as {@link Character.UnicodeScript#LATIN Latin}, or * one of the following three special values, * {@link Character.UnicodeScript#INHERITED Inherited}, * {@link Character.UnicodeScript#COMMON Common} or * {@link Character.UnicodeScript#UNKNOWN Unknown}. * * @since 1.7
*/ publicstaticenum UnicodeScript { /** * Unicode script "Common".
*/
COMMON,
/** * Returns the enum constant representing the Unicode script of which * the given character (Unicode code point) is assigned to. * * @param codePoint the character (Unicode code point) in question. * @return The {@code UnicodeScript} constant representing the * Unicode script of which this character is assigned to. * * @throws IllegalArgumentException if the specified * {@code codePoint} is an invalid Unicode code point. * @see Character#isValidCodePoint(int) *
*/ publicstatic UnicodeScript of(int codePoint) { if (!isValidCodePoint(codePoint)) thrownew IllegalArgumentException(
String.format("Not a valid Unicode code point: 0x%X", codePoint)); int type = getType(codePoint); // leave SURROGATE and PRIVATE_USE for table lookup if (type == UNASSIGNED) return UNKNOWN; int index = Arrays.binarySearch(scriptStarts, codePoint); if (index < 0)
index = -index - 2; return scripts[index];
}
/** * Returns the UnicodeScript constant with the given Unicode script * name or the script name alias. Script names and their aliases are * determined by The Unicode Standard. The files {@code Scripts.txt} * and {@code PropertyValueAliases.txt} define script names * and the script name aliases for a particular version of the * standard. The {@link Character} class specifies the version of * the standard that it supports. * <p> * Character case is ignored for all of the valid script names. * The en_US locale's case mapping rules are used to provide * case-insensitive string comparisons for script name validation. * * @param scriptName A {@code UnicodeScript} name. * @return The {@code UnicodeScript} constant identified * by {@code scriptName} * @throws IllegalArgumentException if {@code scriptName} is an * invalid name * @throws NullPointerException if {@code scriptName} is null
*/ publicstaticfinal UnicodeScript forName(String scriptName) {
scriptName = scriptName.toUpperCase(Locale.ENGLISH); //.replace(' ', '_'));
UnicodeScript sc = aliases.get(scriptName); if (sc != null) return sc; return valueOf(scriptName);
}
}
/** * The value of the {@code Character}. * * @serial
*/ privatefinalchar value;
/** use serialVersionUID from JDK 1.0.2 for interoperability */
@java.io.Serial privatestaticfinallong serialVersionUID = 3786198910865385080L;
/** * Constructs a newly allocated {@code Character} object that * represents the specified {@code char} value. * * @param value the value to be represented by the * {@code Character} object. * * @deprecated * It is rarely appropriate to use this constructor. The static factory * {@link #valueOf(char)} is generally a better choice, as it is * likely to yield significantly better space and time performance.
*/
@Deprecated(since="9", forRemoval = true) public Character(char value) { this.value = value;
}
// Load and use the archived cache if it exists
CDS.initializeFromArchive(CharacterCache.class); if (archivedCache == null || archivedCache.length != size) {
Character[] c = new Character[size]; for (int i = 0; i < size; i++) {
c[i] = new Character((char) i);
}
archivedCache = c;
}
cache = archivedCache;
}
}
/** * Returns a {@code Character} instance representing the specified * {@code char} value. * If a new {@code Character} instance is not required, this method * should generally be used in preference to the constructor * {@link #Character(char)}, as this method is likely to yield * significantly better space and time performance by caching * frequently requested values. * * This method will always cache values in the range {@code * '\u005Cu0000'} to {@code '\u005Cu007F'}, inclusive, and may * cache other values outside of this range. * * @param c a char value. * @return a {@code Character} instance representing {@code c}. * @since 1.5
*/
@IntrinsicCandidate publicstatic Character valueOf(char c) { if (c <= 127) { // must cache return CharacterCache.cache[(int)c];
} returnnew Character(c);
}
/** * Returns the value of this {@code Character} object. * @return the primitive {@code char} value represented by * this object.
*/
@IntrinsicCandidate publicchar charValue() { return value;
}
/** * Returns a hash code for this {@code Character}; equal to the result * of invoking {@code charValue()}. * * @return a hash code value for this {@code Character}
*/
@Override publicint hashCode() { return Character.hashCode(value);
}
/** * Returns a hash code for a {@code char} value; compatible with * {@code Character.hashCode()}. * * @since 1.8 * * @param value The {@code char} for which to return a hash code. * @return a hash code value for a {@code char} value.
*/ publicstaticint hashCode(char value) { return (int)value;
}
/** * Compares this object against the specified object. * The result is {@code true} if and only if the argument is not * {@code null} and is a {@code Character} object that * represents the same {@code char} value as this object. * * @param obj the object to compare with. * @return {@code true} if the objects are the same; * {@code false} otherwise.
*/ publicboolean equals(Object obj) { if (obj instanceof Character) { return value == ((Character)obj).charValue();
} returnfalse;
}
/** * Returns a {@code String} object representing this * {@code Character}'s value. The result is a string of * length 1 whose sole component is the primitive * {@code char} value represented by this * {@code Character} object. * * @return a string representation of this object.
*/
@Override public String toString() { return String.valueOf(value);
}
/** * Returns a {@code String} object representing the * specified {@code char}. The result is a string of length * 1 consisting solely of the specified {@code char}. * * @apiNote This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #toString(int)} method. * * @param c the {@code char} to be converted * @return the string representation of the specified {@code char} * @since 1.4
*/ publicstatic String toString(char c) { return String.valueOf(c);
}
/** * Returns a {@code String} object representing the * specified character (Unicode code point). The result is a string of * length 1 or 2, consisting solely of the specified {@code codePoint}. * * @param codePoint the {@code codePoint} to be converted * @return the string representation of the specified {@code codePoint} * @throws IllegalArgumentException if the specified * {@code codePoint} is not a {@linkplain #isValidCodePoint * valid Unicode code point}. * @since 11
*/ publicstatic String toString(int codePoint) { return String.valueOfCodePoint(codePoint);
}
/** * Determines whether the specified code point is a valid * <a href="http://www.unicode.org/glossary/#code_point"> * Unicode code point value</a>. * * @param codePoint the Unicode code point to be tested * @return {@code true} if the specified code point value is between * {@link #MIN_CODE_POINT} and * {@link #MAX_CODE_POINT} inclusive; * {@code false} otherwise. * @since 1.5
*/ publicstaticboolean isValidCodePoint(int codePoint) { // Optimized form of: // codePoint >= MIN_CODE_POINT && codePoint <= MAX_CODE_POINT int plane = codePoint >>> 16; return plane < ((MAX_CODE_POINT + 1) >>> 16);
}
/** * Determines whether the specified character (Unicode code point) * is in the <a href="#BMP">Basic Multilingual Plane (BMP)</a>. * Such code points can be represented using a single {@code char}. * * @param codePoint the character (Unicode code point) to be tested * @return {@code true} if the specified code point is between * {@link #MIN_VALUE} and {@link #MAX_VALUE} inclusive; * {@code false} otherwise. * @since 1.7
*/ publicstaticboolean isBmpCodePoint(int codePoint) { return codePoint >>> 16 == 0; // Optimized form of: // codePoint >= MIN_VALUE && codePoint <= MAX_VALUE // We consistently use logical shift (>>>) to facilitate // additional runtime optimizations.
}
/** * Determines whether the specified character (Unicode code point) * is in the <a href="#supplementary">supplementary character</a> range. * * @param codePoint the character (Unicode code point) to be tested * @return {@code true} if the specified code point is between * {@link #MIN_SUPPLEMENTARY_CODE_POINT} and * {@link #MAX_CODE_POINT} inclusive; * {@code false} otherwise. * @since 1.5
*/ publicstaticboolean isSupplementaryCodePoint(int codePoint) { return codePoint >= MIN_SUPPLEMENTARY_CODE_POINT
&& codePoint < MAX_CODE_POINT + 1;
}
/** * Determines if the given {@code char} value is a * <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit"> * Unicode high-surrogate code unit</a> * (also known as <i>leading-surrogate code unit</i>). * * <p>Such values do not represent characters by themselves, * but are used in the representation of * <a href="#supplementary">supplementary characters</a> * in the UTF-16 encoding. * * @param ch the {@code char} value to be tested. * @return {@code true} if the {@code char} value is between * {@link #MIN_HIGH_SURROGATE} and * {@link #MAX_HIGH_SURROGATE} inclusive; * {@code false} otherwise. * @see Character#isLowSurrogate(char) * @see Character.UnicodeBlock#of(int) * @since 1.5
*/ publicstaticboolean isHighSurrogate(char ch) { // Help VM constant-fold; MAX_HIGH_SURROGATE + 1 == MIN_LOW_SURROGATE return ch >= MIN_HIGH_SURROGATE && ch < (MAX_HIGH_SURROGATE + 1);
}
/** * Determines if the given {@code char} value is a * <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit"> * Unicode low-surrogate code unit</a> * (also known as <i>trailing-surrogate code unit</i>). * * <p>Such values do not represent characters by themselves, * but are used in the representation of * <a href="#supplementary">supplementary characters</a> * in the UTF-16 encoding. * * @param ch the {@code char} value to be tested. * @return {@code true} if the {@code char} value is between * {@link #MIN_LOW_SURROGATE} and * {@link #MAX_LOW_SURROGATE} inclusive; * {@code false} otherwise. * @see Character#isHighSurrogate(char) * @since 1.5
*/ publicstaticboolean isLowSurrogate(char ch) { return ch >= MIN_LOW_SURROGATE && ch < (MAX_LOW_SURROGATE + 1);
}
/** * Determines if the given {@code char} value is a Unicode * <i>surrogate code unit</i>. * * <p>Such values do not represent characters by themselves, * but are used in the representation of * <a href="#supplementary">supplementary characters</a> * in the UTF-16 encoding. * * <p>A char value is a surrogate code unit if and only if it is either * a {@linkplain #isLowSurrogate(char) low-surrogate code unit} or * a {@linkplain #isHighSurrogate(char) high-surrogate code unit}. * * @param ch the {@code char} value to be tested. * @return {@code true} if the {@code char} value is between * {@link #MIN_SURROGATE} and * {@link #MAX_SURROGATE} inclusive; * {@code false} otherwise. * @since 1.7
*/ publicstaticboolean isSurrogate(char ch) { return ch >= MIN_SURROGATE && ch < (MAX_SURROGATE + 1);
}
/** * Determines whether the specified pair of {@code char} * values is a valid * <a href="http://www.unicode.org/glossary/#surrogate_pair"> * Unicode surrogate pair</a>. * * <p>This method is equivalent to the expression: * <blockquote><pre>{@code * isHighSurrogate(high) && isLowSurrogate(low) * }</pre></blockquote> * * @param high the high-surrogate code value to be tested * @param low the low-surrogate code value to be tested * @return {@code true} if the specified high and * low-surrogate code values represent a valid surrogate pair; * {@code false} otherwise. * @since 1.5
*/ publicstaticboolean isSurrogatePair(char high, char low) { return isHighSurrogate(high) && isLowSurrogate(low);
}
/** * Determines the number of {@code char} values needed to * represent the specified character (Unicode code point). If the * specified character is equal to or greater than 0x10000, then * the method returns 2. Otherwise, the method returns 1. * * <p>This method doesn't validate the specified character to be a * valid Unicode code point. The caller must validate the * character value using {@link #isValidCodePoint(int) isValidCodePoint} * if necessary. * * @param codePoint the character (Unicode code point) to be tested. * @return 2 if the character is a valid supplementary character; 1 otherwise. * @see Character#isSupplementaryCodePoint(int) * @since 1.5
*/ publicstaticint charCount(int codePoint) { return codePoint >= MIN_SUPPLEMENTARY_CODE_POINT ? 2 : 1;
}
/** * Converts the specified surrogate pair to its supplementary code * point value. This method does not validate the specified * surrogate pair. The caller must validate it using {@link * #isSurrogatePair(char, char) isSurrogatePair} if necessary. * * @param high the high-surrogate code unit * @param low the low-surrogate code unit * @return the supplementary code point composed from the * specified surrogate pair. * @since 1.5
*/ publicstaticint toCodePoint(char high, char low) { // Optimized form of: // return ((high - MIN_HIGH_SURROGATE) << 10) // + (low - MIN_LOW_SURROGATE) // + MIN_SUPPLEMENTARY_CODE_POINT; return ((high << 10) + low) + (MIN_SUPPLEMENTARY_CODE_POINT
- (MIN_HIGH_SURROGATE << 10)
- MIN_LOW_SURROGATE);
}
/** * Returns the code point at the given index of the * {@code CharSequence}. If the {@code char} value at * the given index in the {@code CharSequence} is in the * high-surrogate range, the following index is less than the * length of the {@code CharSequence}, and the * {@code char} value at the following index is in the * low-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at the given index is returned. * * @param seq a sequence of {@code char} values (Unicode code * units) * @param index the index to the {@code char} values (Unicode * code units) in {@code seq} to be converted * @return the Unicode code point at the given index * @throws NullPointerException if {@code seq} is null. * @throws IndexOutOfBoundsException if the value * {@code index} is negative or not less than * {@link CharSequence#length() seq.length()}. * @since 1.5
*/ publicstaticint codePointAt(CharSequence seq, int index) { char c1 = seq.charAt(index); if (isHighSurrogate(c1) && ++index < seq.length()) { char c2 = seq.charAt(index); if (isLowSurrogate(c2)) { return toCodePoint(c1, c2);
}
} return c1;
}
/** * Returns the code point at the given index of the * {@code char} array. If the {@code char} value at * the given index in the {@code char} array is in the * high-surrogate range, the following index is less than the * length of the {@code char} array, and the * {@code char} value at the following index is in the * low-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at the given index is returned. * * @param a the {@code char} array * @param index the index to the {@code char} values (Unicode * code units) in the {@code char} array to be converted * @return the Unicode code point at the given index * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException if the value * {@code index} is negative or not less than * the length of the {@code char} array. * @since 1.5
*/ publicstaticint codePointAt(char[] a, int index) { return codePointAtImpl(a, index, a.length);
}
/** * Returns the code point at the given index of the * {@code char} array, where only array elements with * {@code index} less than {@code limit} can be used. If * the {@code char} value at the given index in the * {@code char} array is in the high-surrogate range, the * following index is less than the {@code limit}, and the * {@code char} value at the following index is in the * low-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at the given index is returned. * * @param a the {@code char} array * @param index the index to the {@code char} values (Unicode * code units) in the {@code char} array to be converted * @param limit the index after the last array element that * can be used in the {@code char} array * @return the Unicode code point at the given index * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException if the {@code index} * argument is negative or not less than the {@code limit} * argument, or if the {@code limit} argument is negative or * greater than the length of the {@code char} array. * @since 1.5
*/ publicstaticint codePointAt(char[] a, int index, int limit) { if (index >= limit || index < 0 || limit > a.length) { thrownew IndexOutOfBoundsException();
} return codePointAtImpl(a, index, limit);
}
// throws ArrayIndexOutOfBoundsException if index out of bounds staticint codePointAtImpl(char[] a, int index, int limit) { char c1 = a[index]; if (isHighSurrogate(c1) && ++index < limit) { char c2 = a[index]; if (isLowSurrogate(c2)) { return toCodePoint(c1, c2);
}
} return c1;
}
/** * Returns the code point preceding the given index of the * {@code CharSequence}. If the {@code char} value at * {@code (index - 1)} in the {@code CharSequence} is in * the low-surrogate range, {@code (index - 2)} is not * negative, and the {@code char} value at {@code (index - 2)} * in the {@code CharSequence} is in the * high-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at {@code (index - 1)} is * returned. * * @param seq the {@code CharSequence} instance * @param index the index following the code point that should be returned * @return the Unicode code point value before the given index. * @throws NullPointerException if {@code seq} is null. * @throws IndexOutOfBoundsException if the {@code index} * argument is less than 1 or greater than {@link * CharSequence#length() seq.length()}. * @since 1.5
*/ publicstaticint codePointBefore(CharSequence seq, int index) { char c2 = seq.charAt(--index); if (isLowSurrogate(c2) && index > 0) { char c1 = seq.charAt(--index); if (isHighSurrogate(c1)) { return toCodePoint(c1, c2);
}
} return c2;
}
/** * Returns the code point preceding the given index of the * {@code char} array. If the {@code char} value at * {@code (index - 1)} in the {@code char} array is in * the low-surrogate range, {@code (index - 2)} is not * negative, and the {@code char} value at {@code (index - 2)} * in the {@code char} array is in the * high-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at {@code (index - 1)} is * returned. * * @param a the {@code char} array * @param index the index following the code point that should be returned * @return the Unicode code point value before the given index. * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException if the {@code index} * argument is less than 1 or greater than the length of the * {@code char} array * @since 1.5
*/ publicstaticint codePointBefore(char[] a, int index) { return codePointBeforeImpl(a, index, 0);
}
/** * Returns the code point preceding the given index of the * {@code char} array, where only array elements with * {@code index} greater than or equal to {@code start} * can be used. If the {@code char} value at {@code (index - 1)} * in the {@code char} array is in the * low-surrogate range, {@code (index - 2)} is not less than * {@code start}, and the {@code char} value at * {@code (index - 2)} in the {@code char} array is in * the high-surrogate range, then the supplementary code point * corresponding to this surrogate pair is returned. Otherwise, * the {@code char} value at {@code (index - 1)} is * returned. * * @param a the {@code char} array * @param index the index following the code point that should be returned * @param start the index of the first array element in the * {@code char} array * @return the Unicode code point value before the given index. * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException if the {@code index} * argument is not greater than the {@code start} argument or * is greater than the length of the {@code char} array, or * if the {@code start} argument is negative or not less than * the length of the {@code char} array. * @since 1.5
*/ publicstaticint codePointBefore(char[] a, int index, int start) { if (index <= start || start < 0 || index > a.length) { thrownew IndexOutOfBoundsException();
} return codePointBeforeImpl(a, index, start);
}
// throws ArrayIndexOutOfBoundsException if index-1 out of bounds staticint codePointBeforeImpl(char[] a, int index, int start) { char c2 = a[--index]; if (isLowSurrogate(c2) && index > start) { char c1 = a[--index]; if (isHighSurrogate(c1)) { return toCodePoint(c1, c2);
}
} return c2;
}
/** * Returns the leading surrogate (a * <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit"> * high surrogate code unit</a>) of the * <a href="http://www.unicode.org/glossary/#surrogate_pair"> * surrogate pair</a> * representing the specified supplementary character (Unicode * code point) in the UTF-16 encoding. If the specified character * is not a * <a href="Character.html#supplementary">supplementary character</a>, * an unspecified {@code char} is returned. * * <p>If * {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)} * is {@code true}, then * {@link #isHighSurrogate isHighSurrogate}{@code (highSurrogate(x))} and * {@link #toCodePoint toCodePoint}{@code (highSurrogate(x), }{@link #lowSurrogate lowSurrogate}{@code (x)) == x} * are also always {@code true}. * * @param codePoint a supplementary character (Unicode code point) * @return the leading surrogate code unit used to represent the * character in the UTF-16 encoding * @since 1.7
*/ publicstaticchar highSurrogate(int codePoint) { return (char) ((codePoint >>> 10)
+ (MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT >>> 10)));
}
/** * Returns the trailing surrogate (a * <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit"> * low surrogate code unit</a>) of the * <a href="http://www.unicode.org/glossary/#surrogate_pair"> * surrogate pair</a> * representing the specified supplementary character (Unicode * code point) in the UTF-16 encoding. If the specified character * is not a * <a href="Character.html#supplementary">supplementary character</a>, * an unspecified {@code char} is returned. * * <p>If * {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)} * is {@code true}, then * {@link #isLowSurrogate isLowSurrogate}{@code (lowSurrogate(x))} and * {@link #toCodePoint toCodePoint}{@code (}{@link #highSurrogate highSurrogate}{@code (x), lowSurrogate(x)) == x} * are also always {@code true}. * * @param codePoint a supplementary character (Unicode code point) * @return the trailing surrogate code unit used to represent the * character in the UTF-16 encoding * @since 1.7
*/ publicstaticchar lowSurrogate(int codePoint) { return (char) ((codePoint & 0x3ff) + MIN_LOW_SURROGATE);
}
/** * Converts the specified character (Unicode code point) to its * UTF-16 representation. If the specified code point is a BMP * (Basic Multilingual Plane or Plane 0) value, the same value is * stored in {@code dst[dstIndex]}, and 1 is returned. If the * specified code point is a supplementary character, its * surrogate values are stored in {@code dst[dstIndex]} * (high-surrogate) and {@code dst[dstIndex+1]} * (low-surrogate), and 2 is returned. * * @param codePoint the character (Unicode code point) to be converted. * @param dst an array of {@code char} in which the * {@code codePoint}'s UTF-16 value is stored. * @param dstIndex the start index into the {@code dst} * array where the converted value is stored. * @return 1 if the code point is a BMP code point, 2 if the * code point is a supplementary code point. * @throws IllegalArgumentException if the specified * {@code codePoint} is not a valid Unicode code point. * @throws NullPointerException if the specified {@code dst} is null. * @throws IndexOutOfBoundsException if {@code dstIndex} * is negative or not less than {@code dst.length}, or if * {@code dst} at {@code dstIndex} doesn't have enough * array element(s) to store the resulting {@code char} * value(s). (If {@code dstIndex} is equal to * {@code dst.length-1} and the specified * {@code codePoint} is a supplementary character, the * high-surrogate value is not stored in * {@code dst[dstIndex]}.) * @since 1.5
*/ publicstaticint toChars(int codePoint, char[] dst, int dstIndex) { if (isBmpCodePoint(codePoint)) {
dst[dstIndex] = (char) codePoint; return 1;
} elseif (isValidCodePoint(codePoint)) {
toSurrogates(codePoint, dst, dstIndex); return 2;
} else { thrownew IllegalArgumentException(
String.format("Not a valid Unicode code point: 0x%X", codePoint));
}
}
/** * Converts the specified character (Unicode code point) to its * UTF-16 representation stored in a {@code char} array. If * the specified code point is a BMP (Basic Multilingual Plane or * Plane 0) value, the resulting {@code char} array has * the same value as {@code codePoint}. If the specified code * point is a supplementary code point, the resulting * {@code char} array has the corresponding surrogate pair. * * @param codePoint a Unicode code point * @return a {@code char} array having * {@code codePoint}'s UTF-16 representation. * @throws IllegalArgumentException if the specified * {@code codePoint} is not a valid Unicode code point. * @since 1.5
*/ publicstaticchar[] toChars(int codePoint) { if (isBmpCodePoint(codePoint)) { returnnewchar[] { (char) codePoint };
} elseif (isValidCodePoint(codePoint)) { char[] result = newchar[2];
toSurrogates(codePoint, result, 0); return result;
} else { thrownew IllegalArgumentException(
String.format("Not a valid Unicode code point: 0x%X", codePoint));
}
}
staticvoid toSurrogates(int codePoint, char[] dst, int index) { // We write elements "backwards" to guarantee all-or-nothing
dst[index+1] = lowSurrogate(codePoint);
dst[index] = highSurrogate(codePoint);
}
/** * Returns the number of Unicode code points in the text range of * the specified char sequence. The text range begins at the * specified {@code beginIndex} and extends to the * {@code char} at index {@code endIndex - 1}. Thus the * length (in {@code char}s) of the text range is * {@code endIndex-beginIndex}. Unpaired surrogates within * the text range count as one code point each. * * @param seq the char sequence * @param beginIndex the index to the first {@code char} of * the text range. * @param endIndex the index after the last {@code char} of * the text range. * @return the number of Unicode code points in the specified text * range * @throws NullPointerException if {@code seq} is null. * @throws IndexOutOfBoundsException if the * {@code beginIndex} is negative, or {@code endIndex} * is larger than the length of the given sequence, or * {@code beginIndex} is larger than {@code endIndex}. * @since 1.5
*/ publicstaticint codePointCount(CharSequence seq, int beginIndex, int endIndex) {
Objects.checkFromToIndex(beginIndex, endIndex, seq.length()); int n = endIndex - beginIndex; for (int i = beginIndex; i < endIndex; ) { if (isHighSurrogate(seq.charAt(i++)) && i < endIndex &&
isLowSurrogate(seq.charAt(i))) {
n--;
i++;
}
} return n;
}
/** * Returns the number of Unicode code points in a subarray of the * {@code char} array argument. The {@code offset} * argument is the index of the first {@code char} of the * subarray and the {@code count} argument specifies the * length of the subarray in {@code char}s. Unpaired * surrogates within the subarray count as one code point each. * * @param a the {@code char} array * @param offset the index of the first {@code char} in the * given {@code char} array * @param count the length of the subarray in {@code char}s * @return the number of Unicode code points in the specified subarray * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException if {@code offset} or * {@code count} is negative, or if {@code offset + * count} is larger than the length of the given array. * @since 1.5
*/ publicstaticint codePointCount(char[] a, int offset, int count) {
Objects.checkFromIndexSize(count, offset, a.length); return codePointCountImpl(a, offset, count);
}
staticint codePointCountImpl(char[] a, int offset, int count) { int endIndex = offset + count; int n = count; for (int i = offset; i < endIndex; ) { if (isHighSurrogate(a[i++]) && i < endIndex &&
isLowSurrogate(a[i])) {
n--;
i++;
}
} return n;
}
/** * Returns the index within the given char sequence that is offset * from the given {@code index} by {@code codePointOffset} * code points. Unpaired surrogates within the text range given by * {@code index} and {@code codePointOffset} count as * one code point each. * * @param seq the char sequence * @param index the index to be offset * @param codePointOffset the offset in code points * @return the index within the char sequence * @throws NullPointerException if {@code seq} is null. * @throws IndexOutOfBoundsException if {@code index} * is negative or larger than the length of the char sequence, * or if {@code codePointOffset} is positive and the * subsequence starting with {@code index} has fewer than * {@code codePointOffset} code points, or if * {@code codePointOffset} is negative and the subsequence * before {@code index} has fewer than the absolute value * of {@code codePointOffset} code points. * @since 1.5
*/ publicstaticint offsetByCodePoints(CharSequence seq, int index, int codePointOffset) { int length = seq.length(); if (index < 0 || index > length) { thrownew IndexOutOfBoundsException();
}
int x = index; if (codePointOffset >= 0) { int i; for (i = 0; x < length && i < codePointOffset; i++) { if (isHighSurrogate(seq.charAt(x++)) && x < length &&
isLowSurrogate(seq.charAt(x))) {
x++;
}
} if (i < codePointOffset) { thrownew IndexOutOfBoundsException();
}
} else { int i; for (i = codePointOffset; x > 0 && i < 0; i++) { if (isLowSurrogate(seq.charAt(--x)) && x > 0 &&
isHighSurrogate(seq.charAt(x-1))) {
x--;
}
} if (i < 0) { thrownew IndexOutOfBoundsException();
}
} return x;
}
/** * Returns the index within the given {@code char} subarray * that is offset from the given {@code index} by * {@code codePointOffset} code points. The * {@code start} and {@code count} arguments specify a * subarray of the {@code char} array. Unpaired surrogates * within the text range given by {@code index} and * {@code codePointOffset} count as one code point each. * * @param a the {@code char} array * @param start the index of the first {@code char} of the * subarray * @param count the length of the subarray in {@code char}s * @param index the index to be offset * @param codePointOffset the offset in code points * @return the index within the subarray * @throws NullPointerException if {@code a} is null. * @throws IndexOutOfBoundsException * if {@code start} or {@code count} is negative, * or if {@code start + count} is larger than the length of * the given array, * or if {@code index} is less than {@code start} or * larger then {@code start + count}, * or if {@code codePointOffset} is positive and the text range * starting with {@code index} and ending with {@code start + count - 1} * has fewer than {@code codePointOffset} code * points, * or if {@code codePointOffset} is negative and the text range * starting with {@code start} and ending with {@code index - 1} * has fewer than the absolute value of * {@code codePointOffset} code points. * @since 1.5
*/ publicstaticint offsetByCodePoints(char[] a, int start, int count, int index, int codePointOffset) { if (count > a.length-start || start < 0 || count < 0
|| index < start || index > start+count) { thrownew IndexOutOfBoundsException();
} return offsetByCodePointsImpl(a, start, count, index, codePointOffset);
}
staticint offsetByCodePointsImpl(char[]a, int start, int count, int index, int codePointOffset) { int x = index; if (codePointOffset >= 0) { int limit = start + count; int i; for (i = 0; x < limit && i < codePointOffset; i++) { if (isHighSurrogate(a[x++]) && x < limit &&
isLowSurrogate(a[x])) {
x++;
}
} if (i < codePointOffset) { thrownew IndexOutOfBoundsException();
}
} else { int i; for (i = codePointOffset; x > start && i < 0; i++) { if (isLowSurrogate(a[--x]) && x > start &&
isHighSurrogate(a[x-1])) {
x--;
}
} if (i < 0) { thrownew IndexOutOfBoundsException();
}
} return x;
}
/** * Determines if the specified character is a lowercase character. * <p> * A character is lowercase if its general category type, provided * by {@code Character.getType(ch)}, is * {@code LOWERCASE_LETTER}, or it has contributory property * Other_Lowercase as defined by the Unicode Standard. * <p> * The following are examples of lowercase characters: * <blockquote><pre> * a b c d e f g h i j k l m n o p q r s t u v w x y z * '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6' * '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE' * '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6' * '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF' * </pre></blockquote> * <p> Many other Unicode characters are lowercase too. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isLowerCase(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is lowercase; * {@code false} otherwise. * @see Character#isLowerCase(char) * @see Character#isTitleCase(char) * @see Character#toLowerCase(char) * @see Character#getType(char)
*/ publicstaticboolean isLowerCase(char ch) { return isLowerCase((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a * lowercase character. * <p> * A character is lowercase if its general category type, provided * by {@link Character#getType getType(codePoint)}, is * {@code LOWERCASE_LETTER}, or it has contributory property * Other_Lowercase as defined by the Unicode Standard. * <p> * The following are examples of lowercase characters: * <blockquote><pre> * a b c d e f g h i j k l m n o p q r s t u v w x y z * '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6' * '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE' * '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6' * '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF' * </pre></blockquote> * <p> Many other Unicode characters are lowercase too. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is lowercase; * {@code false} otherwise. * @see Character#isLowerCase(int) * @see Character#isTitleCase(int) * @see Character#toLowerCase(int) * @see Character#getType(int) * @since 1.5
*/ publicstaticboolean isLowerCase(int codePoint) { return CharacterData.of(codePoint).isLowerCase(codePoint);
}
/** * Determines if the specified character is an uppercase character. * <p> * A character is uppercase if its general category type, provided by * {@code Character.getType(ch)}, is {@code UPPERCASE_LETTER}. * or it has contributory property Other_Uppercase as defined by the Unicode Standard. * <p> * The following are examples of uppercase characters: * <blockquote><pre> * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z * '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7' * '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF' * '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8' * '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE' * </pre></blockquote> * <p> Many other Unicode characters are uppercase too. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isUpperCase(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is uppercase; * {@code false} otherwise. * @see Character#isLowerCase(char) * @see Character#isTitleCase(char) * @see Character#toUpperCase(char) * @see Character#getType(char) * @since 1.0
*/ publicstaticboolean isUpperCase(char ch) { return isUpperCase((int)ch);
}
/** * Determines if the specified character (Unicode code point) is an uppercase character. * <p> * A character is uppercase if its general category type, provided by * {@link Character#getType(int) getType(codePoint)}, is {@code UPPERCASE_LETTER}, * or it has contributory property Other_Uppercase as defined by the Unicode Standard. * <p> * The following are examples of uppercase characters: * <blockquote><pre> * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z * '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7' * '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF' * '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8' * '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE' * </pre></blockquote> * <p> Many other Unicode characters are uppercase too. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is uppercase; * {@code false} otherwise. * @see Character#isLowerCase(int) * @see Character#isTitleCase(int) * @see Character#toUpperCase(int) * @see Character#getType(int) * @since 1.5
*/ publicstaticboolean isUpperCase(int codePoint) { return CharacterData.of(codePoint).isUpperCase(codePoint);
}
/** * Determines if the specified character is a titlecase character. * <p> * A character is a titlecase character if its general * category type, provided by {@code Character.getType(ch)}, * is {@code TITLECASE_LETTER}. * <p> * Some characters look like pairs of Latin letters. For example, there * is an uppercase letter that looks like "LJ" and has a corresponding * lowercase letter that looks like "lj". A third form, which looks like "Lj", * is the appropriate form to use when rendering a word in lowercase * with initial capitals, as for a book title. * <p> * These are some of the Unicode characters for which this method returns * {@code true}: * <ul> * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON} * <li>{@code LATIN CAPITAL LETTER L WITH SMALL LETTER J} * <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J} * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z} * </ul> * <p> Many other Unicode characters are titlecase too. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isTitleCase(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is titlecase; * {@code false} otherwise. * @see Character#isLowerCase(char) * @see Character#isUpperCase(char) * @see Character#toTitleCase(char) * @see Character#getType(char) * @since 1.0.2
*/ publicstaticboolean isTitleCase(char ch) { return isTitleCase((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a titlecase character. * <p> * A character is a titlecase character if its general * category type, provided by {@link Character#getType(int) getType(codePoint)}, * is {@code TITLECASE_LETTER}. * <p> * Some characters look like pairs of Latin letters. For example, there * is an uppercase letter that looks like "LJ" and has a corresponding * lowercase letter that looks like "lj". A third form, which looks like "Lj", * is the appropriate form to use when rendering a word in lowercase * with initial capitals, as for a book title. * <p> * These are some of the Unicode characters for which this method returns * {@code true}: * <ul> * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON} * <li>{@code LATIN CAPITAL LETTER L WITH SMALL LETTER J} * <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J} * <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z} * </ul> * <p> Many other Unicode characters are titlecase too. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is titlecase; * {@code false} otherwise. * @see Character#isLowerCase(int) * @see Character#isUpperCase(int) * @see Character#toTitleCase(int) * @see Character#getType(int) * @since 1.5
*/ publicstaticboolean isTitleCase(int codePoint) { return getType(codePoint) == Character.TITLECASE_LETTER;
}
/** * Determines if the specified character is a digit. * <p> * A character is a digit if its general category type, provided * by {@code Character.getType(ch)}, is * {@code DECIMAL_DIGIT_NUMBER}. * <p> * Some Unicode character ranges that contain digits: * <ul> * <li>{@code '\u005Cu0030'} through {@code '\u005Cu0039'}, * ISO-LATIN-1 digits ({@code '0'} through {@code '9'}) * <li>{@code '\u005Cu0660'} through {@code '\u005Cu0669'}, * Arabic-Indic digits * <li>{@code '\u005Cu06F0'} through {@code '\u005Cu06F9'}, * Extended Arabic-Indic digits * <li>{@code '\u005Cu0966'} through {@code '\u005Cu096F'}, * Devanagari digits * <li>{@code '\u005CuFF10'} through {@code '\u005CuFF19'}, * Fullwidth digits * </ul> * * Many other character ranges contain digits as well. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isDigit(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is a digit; * {@code false} otherwise. * @see Character#digit(char, int) * @see Character#forDigit(int, int) * @see Character#getType(char)
*/ publicstaticboolean isDigit(char ch) { return isDigit((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a digit. * <p> * A character is a digit if its general category type, provided * by {@link Character#getType(int) getType(codePoint)}, is * {@code DECIMAL_DIGIT_NUMBER}. * <p> * Some Unicode character ranges that contain digits: * <ul> * <li>{@code '\u005Cu0030'} through {@code '\u005Cu0039'}, * ISO-LATIN-1 digits ({@code '0'} through {@code '9'}) * <li>{@code '\u005Cu0660'} through {@code '\u005Cu0669'}, * Arabic-Indic digits * <li>{@code '\u005Cu06F0'} through {@code '\u005Cu06F9'}, * Extended Arabic-Indic digits * <li>{@code '\u005Cu0966'} through {@code '\u005Cu096F'}, * Devanagari digits * <li>{@code '\u005CuFF10'} through {@code '\u005CuFF19'}, * Fullwidth digits * </ul> * * Many other character ranges contain digits as well. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a digit; * {@code false} otherwise. * @see Character#forDigit(int, int) * @see Character#getType(int) * @since 1.5
*/ publicstaticboolean isDigit(int codePoint) { return CharacterData.of(codePoint).isDigit(codePoint);
}
/** * Determines if a character is defined in Unicode. * <p> * A character is defined if at least one of the following is true: * <ul> * <li>It has an entry in the UnicodeData file. * <li>It has a value in a range defined by the UnicodeData file. * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isDefined(int)} method. * * @param ch the character to be tested * @return {@code true} if the character has a defined meaning * in Unicode; {@code false} otherwise. * @see Character#isDigit(char) * @see Character#isLetter(char) * @see Character#isLetterOrDigit(char) * @see Character#isLowerCase(char) * @see Character#isTitleCase(char) * @see Character#isUpperCase(char) * @since 1.0.2
*/ publicstaticboolean isDefined(char ch) { return isDefined((int)ch);
}
/** * Determines if a character (Unicode code point) is defined in Unicode. * <p> * A character is defined if at least one of the following is true: * <ul> * <li>It has an entry in the UnicodeData file. * <li>It has a value in a range defined by the UnicodeData file. * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character has a defined meaning * in Unicode; {@code false} otherwise. * @see Character#isDigit(int) * @see Character#isLetter(int) * @see Character#isLetterOrDigit(int) * @see Character#isLowerCase(int) * @see Character#isTitleCase(int) * @see Character#isUpperCase(int) * @since 1.5
*/ publicstaticboolean isDefined(int codePoint) { return getType(codePoint) != Character.UNASSIGNED;
}
/** * Determines if the specified character is a letter. * <p> * A character is considered to be a letter if its general * category type, provided by {@code Character.getType(ch)}, * is any of the following: * <ul> * <li> {@code UPPERCASE_LETTER} * <li> {@code LOWERCASE_LETTER} * <li> {@code TITLECASE_LETTER} * <li> {@code MODIFIER_LETTER} * <li> {@code OTHER_LETTER} * </ul> * * Not all letters have case. Many characters are * letters but are neither uppercase nor lowercase nor titlecase. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isLetter(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is a letter; * {@code false} otherwise. * @see Character#isDigit(char) * @see Character#isJavaIdentifierStart(char) * @see Character#isJavaLetter(char) * @see Character#isJavaLetterOrDigit(char) * @see Character#isLetterOrDigit(char) * @see Character#isLowerCase(char) * @see Character#isTitleCase(char) * @see Character#isUnicodeIdentifierStart(char) * @see Character#isUpperCase(char)
*/ publicstaticboolean isLetter(char ch) { return isLetter((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a letter. * <p> * A character is considered to be a letter if its general * category type, provided by {@link Character#getType(int) getType(codePoint)}, * is any of the following: * <ul> * <li> {@code UPPERCASE_LETTER} * <li> {@code LOWERCASE_LETTER} * <li> {@code TITLECASE_LETTER} * <li> {@code MODIFIER_LETTER} * <li> {@code OTHER_LETTER} * </ul> * * Not all letters have case. Many characters are * letters but are neither uppercase nor lowercase nor titlecase. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a letter; * {@code false} otherwise. * @see Character#isDigit(int) * @see Character#isJavaIdentifierStart(int) * @see Character#isLetterOrDigit(int) * @see Character#isLowerCase(int) * @see Character#isTitleCase(int) * @see Character#isUnicodeIdentifierStart(int) * @see Character#isUpperCase(int) * @since 1.5
*/ publicstaticboolean isLetter(int codePoint) { return ((((1 << Character.UPPERCASE_LETTER) |
(1 << Character.LOWERCASE_LETTER) |
(1 << Character.TITLECASE_LETTER) |
(1 << Character.MODIFIER_LETTER) |
(1 << Character.OTHER_LETTER)) >> getType(codePoint)) & 1)
!= 0;
}
/** * Determines if the specified character is a letter or digit. * <p> * A character is considered to be a letter or digit if either * {@code Character.isLetter(char ch)} or * {@code Character.isDigit(char ch)} returns * {@code true} for the character. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isLetterOrDigit(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is a letter or digit; * {@code false} otherwise. * @see Character#isDigit(char) * @see Character#isJavaIdentifierPart(char) * @see Character#isJavaLetter(char) * @see Character#isJavaLetterOrDigit(char) * @see Character#isLetter(char) * @see Character#isUnicodeIdentifierPart(char) * @since 1.0.2
*/ publicstaticboolean isLetterOrDigit(char ch) { return isLetterOrDigit((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a letter or digit. * <p> * A character is considered to be a letter or digit if either * {@link #isLetter(int) isLetter(codePoint)} or * {@link #isDigit(int) isDigit(codePoint)} returns * {@code true} for the character. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a letter or digit; * {@code false} otherwise. * @see Character#isDigit(int) * @see Character#isJavaIdentifierPart(int) * @see Character#isLetter(int) * @see Character#isUnicodeIdentifierPart(int) * @since 1.5
*/ publicstaticboolean isLetterOrDigit(int codePoint) { return ((((1 << Character.UPPERCASE_LETTER) |
(1 << Character.LOWERCASE_LETTER) |
(1 << Character.TITLECASE_LETTER) |
(1 << Character.MODIFIER_LETTER) |
(1 << Character.OTHER_LETTER) |
(1 << Character.DECIMAL_DIGIT_NUMBER)) >> getType(codePoint)) & 1)
!= 0;
}
/** * Determines if the specified character is permissible as the first * character in a Java identifier. * <p> * A character may start a Java identifier if and only if * one of the following conditions is true: * <ul> * <li> {@link #isLetter(char) isLetter(ch)} returns {@code true} * <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER} * <li> {@code ch} is a currency symbol (such as {@code '$'}) * <li> {@code ch} is a connecting punctuation character (such as {@code '_'}). * </ul> * * @param ch the character to be tested. * @return {@code true} if the character may start a Java * identifier; {@code false} otherwise. * @see Character#isJavaLetterOrDigit(char) * @see Character#isJavaIdentifierStart(char) * @see Character#isJavaIdentifierPart(char) * @see Character#isLetter(char) * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierStart(char) * @since 1.0.2 * @deprecated Replaced by isJavaIdentifierStart(char).
*/
@Deprecated(since="1.1") publicstaticboolean isJavaLetter(char ch) { return isJavaIdentifierStart(ch);
}
/** * Determines if the specified character may be part of a Java * identifier as other than the first character. * <p> * A character may be part of a Java identifier if and only if one * of the following conditions is true: * <ul> * <li> it is a letter * <li> it is a currency symbol (such as {@code '$'}) * <li> it is a connecting punctuation character (such as {@code '_'}) * <li> it is a digit * <li> it is a numeric letter (such as a Roman numeral character) * <li> it is a combining mark * <li> it is a non-spacing mark * <li> {@code isIdentifierIgnorable} returns * {@code true} for the character. * </ul> * * @param ch the character to be tested. * @return {@code true} if the character may be part of a * Java identifier; {@code false} otherwise. * @see Character#isJavaLetter(char) * @see Character#isJavaIdentifierStart(char) * @see Character#isJavaIdentifierPart(char) * @see Character#isLetter(char) * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierPart(char) * @see Character#isIdentifierIgnorable(char) * @since 1.0.2 * @deprecated Replaced by isJavaIdentifierPart(char).
*/
@Deprecated(since="1.1") publicstaticboolean isJavaLetterOrDigit(char ch) { return isJavaIdentifierPart(ch);
}
/** * Determines if the specified character (Unicode code point) is alphabetic. * <p> * A character is considered to be alphabetic if its general category type, * provided by {@link Character#getType(int) getType(codePoint)}, is any of * the following: * <ul> * <li> {@code UPPERCASE_LETTER} * <li> {@code LOWERCASE_LETTER} * <li> {@code TITLECASE_LETTER} * <li> {@code MODIFIER_LETTER} * <li> {@code OTHER_LETTER} * <li> {@code LETTER_NUMBER} * </ul> * or it has contributory property Other_Alphabetic as defined by the * Unicode Standard. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a Unicode alphabet * character, {@code false} otherwise. * @since 1.7
*/ publicstaticboolean isAlphabetic(int codePoint) { return (((((1 << Character.UPPERCASE_LETTER) |
(1 << Character.LOWERCASE_LETTER) |
(1 << Character.TITLECASE_LETTER) |
(1 << Character.MODIFIER_LETTER) |
(1 << Character.OTHER_LETTER) |
(1 << Character.LETTER_NUMBER)) >> getType(codePoint)) & 1) != 0) ||
CharacterData.of(codePoint).isOtherAlphabetic(codePoint);
}
/** * Determines if the specified character (Unicode code point) is a CJKV * (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by * the Unicode Standard. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a Unicode ideograph * character, {@code false} otherwise. * @since 1.7
*/ publicstaticboolean isIdeographic(int codePoint) { return CharacterData.of(codePoint).isIdeographic(codePoint);
}
/** * Determines if the specified character is * permissible as the first character in a Java identifier. * <p> * A character may start a Java identifier if and only if * one of the following conditions is true: * <ul> * <li> {@link #isLetter(char) isLetter(ch)} returns {@code true} * <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER} * <li> {@code ch} is a currency symbol (such as {@code '$'}) * <li> {@code ch} is a connecting punctuation character (such as {@code '_'}). * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isJavaIdentifierStart(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character may start a Java identifier; * {@code false} otherwise. * @see Character#isJavaIdentifierPart(char) * @see Character#isLetter(char) * @see Character#isUnicodeIdentifierStart(char) * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence) * @since 1.1
*/
@SuppressWarnings("doclint:reference") // cross-module links publicstaticboolean isJavaIdentifierStart(char ch) { return isJavaIdentifierStart((int)ch);
}
/** * Determines if the character (Unicode code point) is * permissible as the first character in a Java identifier. * <p> * A character may start a Java identifier if and only if * one of the following conditions is true: * <ul> * <li> {@link #isLetter(int) isLetter(codePoint)} * returns {@code true} * <li> {@link #getType(int) getType(codePoint)} * returns {@code LETTER_NUMBER} * <li> the referenced character is a currency symbol (such as {@code '$'}) * <li> the referenced character is a connecting punctuation character * (such as {@code '_'}). * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character may start a Java identifier; * {@code false} otherwise. * @see Character#isJavaIdentifierPart(int) * @see Character#isLetter(int) * @see Character#isUnicodeIdentifierStart(int) * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence) * @since 1.5
*/
@SuppressWarnings("doclint:reference") // cross-module links publicstaticboolean isJavaIdentifierStart(int codePoint) { return CharacterData.of(codePoint).isJavaIdentifierStart(codePoint);
}
/** * Determines if the specified character may be part of a Java * identifier as other than the first character. * <p> * A character may be part of a Java identifier if any of the following * conditions are true: * <ul> * <li> it is a letter * <li> it is a currency symbol (such as {@code '$'}) * <li> it is a connecting punctuation character (such as {@code '_'}) * <li> it is a digit * <li> it is a numeric letter (such as a Roman numeral character) * <li> it is a combining mark * <li> it is a non-spacing mark * <li> {@code isIdentifierIgnorable} returns * {@code true} for the character * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isJavaIdentifierPart(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character may be part of a * Java identifier; {@code false} otherwise. * @see Character#isIdentifierIgnorable(char) * @see Character#isJavaIdentifierStart(char) * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierPart(char) * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence) * @since 1.1
*/
@SuppressWarnings("doclint:reference") // cross-module links publicstaticboolean isJavaIdentifierPart(char ch) { return isJavaIdentifierPart((int)ch);
}
/** * Determines if the character (Unicode code point) may be part of a Java * identifier as other than the first character. * <p> * A character may be part of a Java identifier if any of the following * conditions are true: * <ul> * <li> it is a letter * <li> it is a currency symbol (such as {@code '$'}) * <li> it is a connecting punctuation character (such as {@code '_'}) * <li> it is a digit * <li> it is a numeric letter (such as a Roman numeral character) * <li> it is a combining mark * <li> it is a non-spacing mark * <li> {@link #isIdentifierIgnorable(int) * isIdentifierIgnorable(codePoint)} returns {@code true} for * the code point * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character may be part of a * Java identifier; {@code false} otherwise. * @see Character#isIdentifierIgnorable(int) * @see Character#isJavaIdentifierStart(int) * @see Character#isLetterOrDigit(int) * @see Character#isUnicodeIdentifierPart(int) * @see java.compiler/javax.lang.model.SourceVersion#isIdentifier(CharSequence) * @since 1.5
*/
@SuppressWarnings("doclint:reference") // cross-module links publicstaticboolean isJavaIdentifierPart(int codePoint) { return CharacterData.of(codePoint).isJavaIdentifierPart(codePoint);
}
/** * Determines if the specified character is permissible as the * first character in a Unicode identifier. * <p> * A character may start a Unicode identifier if and only if * one of the following conditions is true: * <ul> * <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 * all Unicode characters, including supplementary characters, use * the {@link #isUnicodeIdentifierStart(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character may start a Unicode * identifier; {@code false} otherwise. * @see Character#isJavaIdentifierStart(char) * @see Character#isLetter(char) * @see Character#isUnicodeIdentifierPart(char) * @since 1.1
*/ publicstaticboolean isUnicodeIdentifierStart(char ch) { return isUnicodeIdentifierStart((int)ch);
}
/** * Determines if the specified character (Unicode code point) is permissible as the * first character in a Unicode identifier. * <p> * A character may start a Unicode identifier if and only if * one of the following conditions is true: * <ul> * <li> {@link #isLetter(int) isLetter(codePoint)} * 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. * @see Character#isJavaIdentifierStart(int) * @see Character#isLetter(int) * @see Character#isUnicodeIdentifierPart(int) * @since 1.5
*/ publicstaticboolean isUnicodeIdentifierStart(int codePoint) { return CharacterData.of(codePoint).isUnicodeIdentifierStart(codePoint);
}
/** * Determines if the specified character may be part of a Unicode * identifier as other than the first character. * <p> * A character may be part of a Unicode identifier if and only if * one of the following statements is true: * <ul> * <li> it is a letter * <li> it is a connecting punctuation character (such as {@code '_'}) * <li> it is a digit * <li> it is a numeric letter (such as a Roman numeral character) * <li> it is a combining mark * <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 * all Unicode characters, including supplementary characters, use * the {@link #isUnicodeIdentifierPart(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character may be part of a * Unicode identifier; {@code false} otherwise. * @see Character#isIdentifierIgnorable(char) * @see Character#isJavaIdentifierPart(char) * @see Character#isLetterOrDigit(char) * @see Character#isUnicodeIdentifierStart(char) * @since 1.1
*/ publicstaticboolean isUnicodeIdentifierPart(char ch) { return isUnicodeIdentifierPart((int)ch);
}
/** * Determines if the specified character (Unicode code point) may be part of a Unicode * identifier as other than the first character. * <p> * A character may be part of a Unicode identifier if and only if * one of the following statements is true: * <ul> * <li> it is a letter * <li> it is a connecting punctuation character (such as {@code '_'}) * <li> it is a digit * <li> it is a numeric letter (such as a Roman numeral character) * <li> it is a combining mark * <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. * @see Character#isIdentifierIgnorable(int) * @see Character#isJavaIdentifierPart(int) * @see Character#isLetterOrDigit(int) * @see Character#isUnicodeIdentifierStart(int) * @since 1.5
*/ publicstaticboolean isUnicodeIdentifierPart(int codePoint) { return CharacterData.of(codePoint).isUnicodeIdentifierPart(codePoint);
}
/** * Determines if the specified character should be regarded as * an ignorable character in a Java identifier or a Unicode identifier. * <p> * The following Unicode characters are ignorable in a Java identifier * or a Unicode identifier: * <ul> * <li>ISO control characters that are not whitespace * <ul> * <li>{@code '\u005Cu0000'} through {@code '\u005Cu0008'} * <li>{@code '\u005Cu000E'} through {@code '\u005Cu001B'} * <li>{@code '\u005Cu007F'} through {@code '\u005Cu009F'} * </ul> * * <li>all characters that have the {@code FORMAT} general * category value * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isIdentifierIgnorable(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is an ignorable control * character that may be part of a Java or Unicode identifier; * {@code false} otherwise. * @see Character#isJavaIdentifierPart(char) * @see Character#isUnicodeIdentifierPart(char) * @since 1.1
*/ publicstaticboolean isIdentifierIgnorable(char ch) { return isIdentifierIgnorable((int)ch);
}
/** * Determines if the specified character (Unicode code point) should be regarded as * an ignorable character in a Java identifier or a Unicode identifier. * <p> * The following Unicode characters are ignorable in a Java identifier * or a Unicode identifier: * <ul> * <li>ISO control characters that are not whitespace * <ul> * <li>{@code '\u005Cu0000'} through {@code '\u005Cu0008'} * <li>{@code '\u005Cu000E'} through {@code '\u005Cu001B'} * <li>{@code '\u005Cu007F'} through {@code '\u005Cu009F'} * </ul> * * <li>all characters that have the {@code FORMAT} general * category value * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is an ignorable control * character that may be part of a Java or Unicode identifier; * {@code false} otherwise. * @see Character#isJavaIdentifierPart(int) * @see Character#isUnicodeIdentifierPart(int) * @since 1.5
*/ publicstaticboolean isIdentifierIgnorable(int codePoint) { return CharacterData.of(codePoint).isIdentifierIgnorable(codePoint);
}
/** * Converts the character argument to lowercase using case * mapping information from the UnicodeData file. * <p> * Note that * {@code Character.isLowerCase(Character.toLowerCase(ch))} * does not always return {@code true} for some ranges of * characters, particularly those that are symbols or ideographs. * * <p>In general, {@link String#toLowerCase()} should be used to map * characters to lowercase. {@code String} case mapping methods * have several benefits over {@code Character} case mapping methods. * {@code String} case mapping methods can perform locale-sensitive * mappings, context-sensitive mappings, and 1:M character mappings, whereas * the {@code Character} case mapping methods cannot. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #toLowerCase(int)} method. * * @param ch the character to be converted. * @return the lowercase equivalent of the character, if any; * otherwise, the character itself. * @see Character#isLowerCase(char) * @see String#toLowerCase()
*/ publicstaticchar toLowerCase(char ch) { return (char)toLowerCase((int)ch);
}
/** * Converts the character (Unicode code point) argument to * lowercase using case mapping information from the UnicodeData * file. * * <p> Note that * {@code Character.isLowerCase(Character.toLowerCase(codePoint))} * does not always return {@code true} for some ranges of * characters, particularly those that are symbols or ideographs. * * <p>In general, {@link String#toLowerCase()} should be used to map * characters to lowercase. {@code String} case mapping methods * have several benefits over {@code Character} case mapping methods. * {@code String} case mapping methods can perform locale-sensitive * mappings, context-sensitive mappings, and 1:M character mappings, whereas * the {@code Character} case mapping methods cannot. * * @param codePoint the character (Unicode code point) to be converted. * @return the lowercase equivalent of the character (Unicode code * point), if any; otherwise, the character itself. * @see Character#isLowerCase(int) * @see String#toLowerCase() * * @since 1.5
*/ publicstaticint toLowerCase(int codePoint) { return CharacterData.of(codePoint).toLowerCase(codePoint);
}
/** * Converts the character argument to uppercase using case mapping * information from the UnicodeData file. * <p> * Note that * {@code Character.isUpperCase(Character.toUpperCase(ch))} * does not always return {@code true} for some ranges of * characters, particularly those that are symbols or ideographs. * * <p>In general, {@link String#toUpperCase()} should be used to map * characters to uppercase. {@code String} case mapping methods * have several benefits over {@code Character} case mapping methods. * {@code String} case mapping methods can perform locale-sensitive * mappings, context-sensitive mappings, and 1:M character mappings, whereas * the {@code Character} case mapping methods cannot. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #toUpperCase(int)} method. * * @param ch the character to be converted. * @return the uppercase equivalent of the character, if any; * otherwise, the character itself. * @see Character#isUpperCase(char) * @see String#toUpperCase()
*/ publicstaticchar toUpperCase(char ch) { return (char)toUpperCase((int)ch);
}
/** * Converts the character (Unicode code point) argument to * uppercase using case mapping information from the UnicodeData * file. * * <p>Note that * {@code Character.isUpperCase(Character.toUpperCase(codePoint))} * does not always return {@code true} for some ranges of * characters, particularly those that are symbols or ideographs. * * <p>In general, {@link String#toUpperCase()} should be used to map * characters to uppercase. {@code String} case mapping methods * have several benefits over {@code Character} case mapping methods. * {@code String} case mapping methods can perform locale-sensitive * mappings, context-sensitive mappings, and 1:M character mappings, whereas * the {@code Character} case mapping methods cannot. * * @param codePoint the character (Unicode code point) to be converted. * @return the uppercase equivalent of the character, if any; * otherwise, the character itself. * @see Character#isUpperCase(int) * @see String#toUpperCase() * * @since 1.5
*/ publicstaticint toUpperCase(int codePoint) { return CharacterData.of(codePoint).toUpperCase(codePoint);
}
/** * Converts the character argument to titlecase using case mapping * information from the UnicodeData file. If a character has no * explicit titlecase mapping and is not itself a titlecase char * according to UnicodeData, then the uppercase mapping is * returned as an equivalent titlecase mapping. If the * {@code char} argument is already a titlecase * {@code char}, the same {@code char} value will be * returned. * <p> * Note that * {@code Character.isTitleCase(Character.toTitleCase(ch))} * does not always return {@code true} for some ranges of * characters. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #toTitleCase(int)} method. * * @param ch the character to be converted. * @return the titlecase equivalent of the character, if any; * otherwise, the character itself. * @see Character#isTitleCase(char) * @see Character#toLowerCase(char) * @see Character#toUpperCase(char) * @since 1.0.2
*/ publicstaticchar toTitleCase(char ch) { return (char)toTitleCase((int)ch);
}
/** * Converts the character (Unicode code point) argument to titlecase using case mapping * information from the UnicodeData file. If a character has no * explicit titlecase mapping and is not itself a titlecase char * according to UnicodeData, then the uppercase mapping is * returned as an equivalent titlecase mapping. If the * character argument is already a titlecase * character, the same character value will be * returned. * * <p>Note that * {@code Character.isTitleCase(Character.toTitleCase(codePoint))} * does not always return {@code true} for some ranges of * characters. * * @param codePoint the character (Unicode code point) to be converted. * @return the titlecase equivalent of the character, if any; * otherwise, the character itself. * @see Character#isTitleCase(int) * @see Character#toLowerCase(int) * @see Character#toUpperCase(int) * @since 1.5
*/ publicstaticint toTitleCase(int codePoint) { return CharacterData.of(codePoint).toTitleCase(codePoint);
}
/** * Returns the numeric value of the character {@code ch} in the * specified radix. * <p> * If the radix is not in the range {@code MIN_RADIX} ≤ * {@code radix} ≤ {@code MAX_RADIX} or if the * value of {@code ch} is not a valid digit in the specified * radix, {@code -1} is returned. A character is a valid digit * if at least one of the following is true: * <ul> * <li>The method {@code isDigit} is {@code true} of the character * and the Unicode decimal digit value of the character (or its * single-character decomposition) is less than the specified radix. * In this case the decimal digit value is returned. * <li>The character is one of the uppercase Latin letters * {@code 'A'} through {@code 'Z'} and its code is less than * {@code radix + 'A' - 10}. * In this case, {@code ch - 'A' + 10} * is returned. * <li>The character is one of the lowercase Latin letters * {@code 'a'} through {@code 'z'} and its code is less than * {@code radix + 'a' - 10}. * In this case, {@code ch - 'a' + 10} * is returned. * <li>The character is one of the fullwidth uppercase Latin letters A * ({@code '\u005CuFF21'}) through Z ({@code '\u005CuFF3A'}) * and its code is less than * {@code radix + '\u005CuFF21' - 10}. * In this case, {@code ch - '\u005CuFF21' + 10} * is returned. * <li>The character is one of the fullwidth lowercase Latin letters a * ({@code '\u005CuFF41'}) through z ({@code '\u005CuFF5A'}) * and its code is less than * {@code radix + '\u005CuFF41' - 10}. * In this case, {@code ch - '\u005CuFF41' + 10} * is returned. * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #digit(int, int)} method. * * @param ch the character to be converted. * @param radix the radix. * @return the numeric value represented by the character in the * specified radix. * @see Character#forDigit(int, int) * @see Character#isDigit(char)
*/ publicstaticint digit(char ch, int radix) { return digit((int)ch, radix);
}
/** * Returns the numeric value of the specified character (Unicode * code point) in the specified radix. * * <p>If the radix is not in the range {@code MIN_RADIX} ≤ * {@code radix} ≤ {@code MAX_RADIX} or if the * character is not a valid digit in the specified * radix, {@code -1} is returned. A character is a valid digit * if at least one of the following is true: * <ul> * <li>The method {@link #isDigit(int) isDigit(codePoint)} is {@code true} of the character * and the Unicode decimal digit value of the character (or its * single-character decomposition) is less than the specified radix. * In this case the decimal digit value is returned. * <li>The character is one of the uppercase Latin letters * {@code 'A'} through {@code 'Z'} and its code is less than * {@code radix + 'A' - 10}. * In this case, {@code codePoint - 'A' + 10} * is returned. * <li>The character is one of the lowercase Latin letters * {@code 'a'} through {@code 'z'} and its code is less than * {@code radix + 'a' - 10}. * In this case, {@code codePoint - 'a' + 10} * is returned. * <li>The character is one of the fullwidth uppercase Latin letters A * ({@code '\u005CuFF21'}) through Z ({@code '\u005CuFF3A'}) * and its code is less than * {@code radix + '\u005CuFF21' - 10}. * In this case, * {@code codePoint - '\u005CuFF21' + 10} * is returned. * <li>The character is one of the fullwidth lowercase Latin letters a * ({@code '\u005CuFF41'}) through z ({@code '\u005CuFF5A'}) * and its code is less than * {@code radix + '\u005CuFF41'- 10}. * In this case, * {@code codePoint - '\u005CuFF41' + 10} * is returned. * </ul> * * @param codePoint the character (Unicode code point) to be converted. * @param radix the radix. * @return the numeric value represented by the character in the * specified radix. * @see Character#forDigit(int, int) * @see Character#isDigit(int) * @since 1.5
*/ publicstaticint digit(int codePoint, int radix) { return CharacterData.of(codePoint).digit(codePoint, radix);
}
/** * Returns the {@code int} value that the specified Unicode * character represents. For example, the character * {@code '\u005Cu216C'} (the roman numeral fifty) will return * an int with a value of 50. * <p> * The letters A-Z in their uppercase ({@code '\u005Cu0041'} through * {@code '\u005Cu005A'}), lowercase * ({@code '\u005Cu0061'} through {@code '\u005Cu007A'}), and * full width variant ({@code '\u005CuFF21'} through * {@code '\u005CuFF3A'} and {@code '\u005CuFF41'} through * {@code '\u005CuFF5A'}) forms have numeric values from 10 * through 35. This is independent of the Unicode specification, * which does not assign numeric values to these {@code char} * values. * <p> * If the character does not have a numeric value, then -1 is returned. * If the character has a numeric value that cannot be represented as a * nonnegative integer (for example, a fractional value), then -2 * is returned. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #getNumericValue(int)} method. * * @param ch the character to be converted. * @return the numeric value of the character, as a nonnegative {@code int} * value; -2 if the character has a numeric value but the value * can not be represented as a nonnegative {@code int} value; * -1 if the character has no numeric value. * @see Character#forDigit(int, int) * @see Character#isDigit(char) * @since 1.1
*/ publicstaticint getNumericValue(char ch) { return getNumericValue((int)ch);
}
/** * Returns the {@code int} value that the specified * character (Unicode code point) represents. For example, the character * {@code '\u005Cu216C'} (the Roman numeral fifty) will return * an {@code int} with a value of 50. * <p> * The letters A-Z in their uppercase ({@code '\u005Cu0041'} through * {@code '\u005Cu005A'}), lowercase * ({@code '\u005Cu0061'} through {@code '\u005Cu007A'}), and * full width variant ({@code '\u005CuFF21'} through * {@code '\u005CuFF3A'} and {@code '\u005CuFF41'} through * {@code '\u005CuFF5A'}) forms have numeric values from 10 * through 35. This is independent of the Unicode specification, * which does not assign numeric values to these {@code char} * values. * <p> * If the character does not have a numeric value, then -1 is returned. * If the character has a numeric value that cannot be represented as a * nonnegative integer (for example, a fractional value), then -2 * is returned. * * @param codePoint the character (Unicode code point) to be converted. * @return the numeric value of the character, as a nonnegative {@code int} * value; -2 if the character has a numeric value but the value * can not be represented as a nonnegative {@code int} value; * -1 if the character has no numeric value. * @see Character#forDigit(int, int) * @see Character#isDigit(int) * @since 1.5
*/ publicstaticint getNumericValue(int codePoint) { return CharacterData.of(codePoint).getNumericValue(codePoint);
}
/** * Determines if the specified character is ISO-LATIN-1 white space. * This method returns {@code true} for the following five * characters only: * <table class="striped"> * <caption style="display:none">truechars</caption> * <thead> * <tr><th scope="col">Character * <th scope="col">Code * <th scope="col">Name * </thead> * <tbody> * <tr><th scope="row">{@code '\t'}</th> <td>{@code U+0009}</td> * <td>{@code HORIZONTAL TABULATION}</td></tr> * <tr><th scope="row">{@code '\n'}</th> <td>{@code U+000A}</td> * <td>{@code NEW LINE}</td></tr> * <tr><th scope="row">{@code '\f'}</th> <td>{@code U+000C}</td> * <td>{@code FORM FEED}</td></tr> * <tr><th scope="row">{@code '\r'}</th> <td>{@code U+000D}</td> * <td>{@code CARRIAGE RETURN}</td></tr> * <tr><th scope="row">{@code ' '}</th> <td>{@code U+0020}</td> * <td>{@code SPACE}</td></tr> * </tbody> * </table> * * @param ch the character to be tested. * @return {@code true} if the character is ISO-LATIN-1 white * space; {@code false} otherwise. * @see Character#isSpaceChar(char) * @see Character#isWhitespace(char) * @deprecated Replaced by isWhitespace(char).
*/
@Deprecated(since="1.1") publicstaticboolean isSpace(char ch) { return (ch <= 0x0020) &&
(((((1L << 0x0009) |
(1L << 0x000A) |
(1L << 0x000C) |
(1L << 0x000D) |
(1L << 0x0020)) >> ch) & 1L) != 0);
}
/** * Determines if the specified character is a Unicode space character. * A character is considered to be a space character if and only if * it is specified to be a space character by the Unicode Standard. This * method returns true if the character's general category type is any of * the following: * <ul> * <li> {@code SPACE_SEPARATOR} * <li> {@code LINE_SEPARATOR} * <li> {@code PARAGRAPH_SEPARATOR} * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isSpaceChar(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is a space character; * {@code false} otherwise. * @see Character#isWhitespace(char) * @since 1.1
*/ publicstaticboolean isSpaceChar(char ch) { return isSpaceChar((int)ch);
}
/** * Determines if the specified character (Unicode code point) is a * Unicode space character. A character is considered to be a * space character if and only if it is specified to be a space * character by the Unicode Standard. This method returns true if * the character's general category type is any of the following: * * <ul> * <li> {@link #SPACE_SEPARATOR} * <li> {@link #LINE_SEPARATOR} * <li> {@link #PARAGRAPH_SEPARATOR} * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a space character; * {@code false} otherwise. * @see Character#isWhitespace(int) * @since 1.5
*/ publicstaticboolean isSpaceChar(int codePoint) { return ((((1 << Character.SPACE_SEPARATOR) |
(1 << Character.LINE_SEPARATOR) |
(1 << Character.PARAGRAPH_SEPARATOR)) >> getType(codePoint)) & 1)
!= 0;
}
/** * Determines if the specified character is white space according to Java. * A character is a Java whitespace character if and only if it satisfies * one of the following criteria: * <ul> * <li> It is a Unicode space character ({@code SPACE_SEPARATOR}, * {@code LINE_SEPARATOR}, or {@code PARAGRAPH_SEPARATOR}) * but is not also a non-breaking space ({@code '\u005Cu00A0'}, * {@code '\u005Cu2007'}, {@code '\u005Cu202F'}). * <li> It is {@code '\u005Ct'}, U+0009 HORIZONTAL TABULATION. * <li> It is {@code '\u005Cn'}, U+000A LINE FEED. * <li> It is {@code '\u005Cu000B'}, U+000B VERTICAL TABULATION. * <li> It is {@code '\u005Cf'}, U+000C FORM FEED. * <li> It is {@code '\u005Cr'}, U+000D CARRIAGE RETURN. * <li> It is {@code '\u005Cu001C'}, U+001C FILE SEPARATOR. * <li> It is {@code '\u005Cu001D'}, U+001D GROUP SEPARATOR. * <li> It is {@code '\u005Cu001E'}, U+001E RECORD SEPARATOR. * <li> It is {@code '\u005Cu001F'}, U+001F UNIT SEPARATOR. * </ul> * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isWhitespace(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is a Java whitespace * character; {@code false} otherwise. * @see Character#isSpaceChar(char) * @since 1.1
*/ publicstaticboolean isWhitespace(char ch) { return isWhitespace((int)ch);
}
/** * Determines if the specified character (Unicode code point) is * white space according to Java. A character is a Java * whitespace character if and only if it satisfies one of the * following criteria: * <ul> * <li> It is a Unicode space character ({@link #SPACE_SEPARATOR}, * {@link #LINE_SEPARATOR}, or {@link #PARAGRAPH_SEPARATOR}) * but is not also a non-breaking space ({@code '\u005Cu00A0'}, * {@code '\u005Cu2007'}, {@code '\u005Cu202F'}). * <li> It is {@code '\u005Ct'}, U+0009 HORIZONTAL TABULATION. * <li> It is {@code '\u005Cn'}, U+000A LINE FEED. * <li> It is {@code '\u005Cu000B'}, U+000B VERTICAL TABULATION. * <li> It is {@code '\u005Cf'}, U+000C FORM FEED. * <li> It is {@code '\u005Cr'}, U+000D CARRIAGE RETURN. * <li> It is {@code '\u005Cu001C'}, U+001C FILE SEPARATOR. * <li> It is {@code '\u005Cu001D'}, U+001D GROUP SEPARATOR. * <li> It is {@code '\u005Cu001E'}, U+001E RECORD SEPARATOR. * <li> It is {@code '\u005Cu001F'}, U+001F UNIT SEPARATOR. * </ul> * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is a Java whitespace * character; {@code false} otherwise. * @see Character#isSpaceChar(int) * @since 1.5
*/ publicstaticboolean isWhitespace(int codePoint) { return CharacterData.of(codePoint).isWhitespace(codePoint);
}
/** * Determines if the specified character is an ISO control * character. A character is considered to be an ISO control * character if its code is in the range {@code '\u005Cu0000'} * through {@code '\u005Cu001F'} or in the range * {@code '\u005Cu007F'} through {@code '\u005Cu009F'}. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isISOControl(int)} method. * * @param ch the character to be tested. * @return {@code true} if the character is an ISO control character; * {@code false} otherwise. * * @see Character#isSpaceChar(char) * @see Character#isWhitespace(char) * @since 1.1
*/ publicstaticboolean isISOControl(char ch) { return isISOControl((int)ch);
}
/** * Determines if the referenced character (Unicode code point) is an ISO control * character. A character is considered to be an ISO control * character if its code is in the range {@code '\u005Cu0000'} * through {@code '\u005Cu001F'} or in the range * {@code '\u005Cu007F'} through {@code '\u005Cu009F'}. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is an ISO control character; * {@code false} otherwise. * @see Character#isSpaceChar(int) * @see Character#isWhitespace(int) * @since 1.5
*/ publicstaticboolean isISOControl(int codePoint) { // Optimized form of: // (codePoint >= 0x00 && codePoint <= 0x1F) || // (codePoint >= 0x7F && codePoint <= 0x9F); return codePoint <= 0x9F &&
(codePoint >= 0x7F || (codePoint >>> 5 == 0));
}
/** * Returns a value indicating a character's general category. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #getType(int)} method. * * @param ch the character to be tested. * @return a value of type {@code int} representing the * character's general category. * @see Character#COMBINING_SPACING_MARK * @see Character#CONNECTOR_PUNCTUATION * @see Character#CONTROL * @see Character#CURRENCY_SYMBOL * @see Character#DASH_PUNCTUATION * @see Character#DECIMAL_DIGIT_NUMBER * @see Character#ENCLOSING_MARK * @see Character#END_PUNCTUATION * @see Character#FINAL_QUOTE_PUNCTUATION * @see Character#FORMAT * @see Character#INITIAL_QUOTE_PUNCTUATION * @see Character#LETTER_NUMBER * @see Character#LINE_SEPARATOR * @see Character#LOWERCASE_LETTER * @see Character#MATH_SYMBOL * @see Character#MODIFIER_LETTER * @see Character#MODIFIER_SYMBOL * @see Character#NON_SPACING_MARK * @see Character#OTHER_LETTER * @see Character#OTHER_NUMBER * @see Character#OTHER_PUNCTUATION * @see Character#OTHER_SYMBOL * @see Character#PARAGRAPH_SEPARATOR * @see Character#PRIVATE_USE * @see Character#SPACE_SEPARATOR * @see Character#START_PUNCTUATION * @see Character#SURROGATE * @see Character#TITLECASE_LETTER * @see Character#UNASSIGNED * @see Character#UPPERCASE_LETTER * @since 1.1
*/ publicstaticint getType(char ch) { return getType((int)ch);
}
/** * Determines the character representation for a specific digit in * the specified radix. If the value of {@code radix} is not a * valid radix, or the value of {@code digit} is not a valid * digit in the specified radix, the null character * ({@code '\u005Cu0000'}) is returned. * <p> * The {@code radix} argument is valid if it is greater than or * equal to {@code MIN_RADIX} and less than or equal to * {@code MAX_RADIX}. The {@code digit} argument is valid if * {@code 0 <= digit < radix}. * <p> * If the digit is less than 10, then * {@code '0' + digit} is returned. Otherwise, the value * {@code 'a' + digit - 10} is returned. * * @param digit the number to convert to a character. * @param radix the radix. * @return the {@code char} representation of the specified digit * in the specified radix. * @see Character#MIN_RADIX * @see Character#MAX_RADIX * @see Character#digit(char, int)
*/ publicstaticchar forDigit(int digit, int radix) { if ((digit >= radix) || (digit < 0)) { return'\0';
} if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) { return'\0';
} if (digit < 10) { return (char)('0' + digit);
} return (char)('a' - 10 + digit);
}
/** * Returns the Unicode directionality property for the given * character. Character directionality is used to calculate the * visual ordering of text. The directionality value of undefined * {@code char} values is {@code DIRECTIONALITY_UNDEFINED}. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #getDirectionality(int)} method. * * @param ch {@code char} for which the directionality property * is requested. * @return the directionality property of the {@code char} value. * * @see Character#DIRECTIONALITY_UNDEFINED * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR * @see Character#DIRECTIONALITY_ARABIC_NUMBER * @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_NONSPACING_MARK * @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL * @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR * @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR * @see Character#DIRECTIONALITY_WHITESPACE * @see Character#DIRECTIONALITY_OTHER_NEUTRALS * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE * @see Character#DIRECTIONALITY_FIRST_STRONG_ISOLATE * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE * @since 1.4
*/ publicstaticbyte getDirectionality(char ch) { return getDirectionality((int)ch);
}
/** * Returns the Unicode directionality property for the given * character (Unicode code point). Character directionality is * used to calculate the visual ordering of text. The * directionality value of undefined character is {@link * #DIRECTIONALITY_UNDEFINED}. * * @param codePoint the character (Unicode code point) for which * the directionality property is requested. * @return the directionality property of the character. * * @see Character#DIRECTIONALITY_UNDEFINED DIRECTIONALITY_UNDEFINED * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT DIRECTIONALITY_LEFT_TO_RIGHT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT DIRECTIONALITY_RIGHT_TO_LEFT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER DIRECTIONALITY_EUROPEAN_NUMBER * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR * @see Character#DIRECTIONALITY_ARABIC_NUMBER DIRECTIONALITY_ARABIC_NUMBER * @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR DIRECTIONALITY_COMMON_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_NONSPACING_MARK DIRECTIONALITY_NONSPACING_MARK * @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL DIRECTIONALITY_BOUNDARY_NEUTRAL * @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR DIRECTIONALITY_PARAGRAPH_SEPARATOR * @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR DIRECTIONALITY_SEGMENT_SEPARATOR * @see Character#DIRECTIONALITY_WHITESPACE DIRECTIONALITY_WHITESPACE * @see Character#DIRECTIONALITY_OTHER_NEUTRALS DIRECTIONALITY_OTHER_NEUTRALS * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT DIRECTIONALITY_POP_DIRECTIONAL_FORMAT * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE DIRECTIONALITY_LEFT_TO_RIGHT_ISOLATE * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE DIRECTIONALITY_RIGHT_TO_LEFT_ISOLATE * @see Character#DIRECTIONALITY_FIRST_STRONG_ISOLATE DIRECTIONALITY_FIRST_STRONG_ISOLATE * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE DIRECTIONALITY_POP_DIRECTIONAL_ISOLATE * @since 1.5
*/ publicstaticbyte getDirectionality(int codePoint) { return CharacterData.of(codePoint).getDirectionality(codePoint);
}
/** * Determines whether the character is mirrored according to the * Unicode specification. Mirrored characters should have their * glyphs horizontally mirrored when displayed in text that is * right-to-left. For example, {@code '\u005Cu0028'} LEFT * PARENTHESIS is semantically defined to be an <i>opening * parenthesis</i>. This will appear as a "(" in text that is * left-to-right but as a ")" in text that is right-to-left. * * <p><b>Note:</b> This method cannot handle <a * href="#supplementary"> supplementary characters</a>. To support * all Unicode characters, including supplementary characters, use * the {@link #isMirrored(int)} method. * * @param ch {@code char} for which the mirrored property is requested * @return {@code true} if the char is mirrored, {@code false} * if the {@code char} is not mirrored or is not defined. * @since 1.4
*/ publicstaticboolean isMirrored(char ch) { return isMirrored((int)ch);
}
/** * Determines whether the specified character (Unicode code point) * is mirrored according to the Unicode specification. Mirrored * characters should have their glyphs horizontally mirrored when * displayed in text that is right-to-left. For example, * {@code '\u005Cu0028'} LEFT PARENTHESIS is semantically * defined to be an <i>opening parenthesis</i>. This will appear * as a "(" in text that is left-to-right but as a ")" in text * that is right-to-left. * * @param codePoint the character (Unicode code point) to be tested. * @return {@code true} if the character is mirrored, {@code false} * if the character is not mirrored or is not defined. * @since 1.5
*/ publicstaticboolean isMirrored(int codePoint) { return CharacterData.of(codePoint).isMirrored(codePoint);
}
/** * Compares two {@code Character} objects numerically. * * @param anotherCharacter the {@code Character} to be compared. * @return the value {@code 0} if the argument {@code Character} * is equal to this {@code Character}; a value less than * {@code 0} if this {@code Character} is numerically less * than the {@code Character} argument; and a value greater than * {@code 0} if this {@code Character} is numerically greater * than the {@code Character} argument (unsigned comparison). * Note that this is strictly a numerical comparison; it is not * locale-dependent. * @since 1.2
*/ publicint compareTo(Character anotherCharacter) { return compare(this.value, anotherCharacter.value);
}
/** * Compares two {@code char} values numerically. * The value returned is identical to what would be returned by: * <pre> * Character.valueOf(x).compareTo(Character.valueOf(y)) * </pre> * * @param x the first {@code char} to compare * @param y the second {@code char} to compare * @return the value {@code 0} if {@code x == y}; * a value less than {@code 0} if {@code x < y}; and * a value greater than {@code 0} if {@code x > y} * @since 1.7
*/ publicstaticint compare(char x, char y) { return x - y;
}
/** * Converts the character (Unicode code point) argument to uppercase using * information from the UnicodeData file. * * @param codePoint the character (Unicode code point) to be converted. * @return either the uppercase equivalent of the character, if * any, or an error flag ({@code Character.ERROR}) * that indicates that a 1:M {@code char} mapping exists. * @see Character#isLowerCase(char) * @see Character#isUpperCase(char) * @see Character#toLowerCase(char) * @see Character#toTitleCase(char) * @since 1.4
*/ staticint toUpperCaseEx(int codePoint) { assert isValidCodePoint(codePoint); return CharacterData.of(codePoint).toUpperCaseEx(codePoint);
}
/** * Converts the character (Unicode code point) argument to uppercase using case * mapping information from the SpecialCasing file in the Unicode * specification. If a character has no explicit uppercase * mapping, then the {@code char} itself is returned in the * {@code char[]}. * * @param codePoint the character (Unicode code point) to be converted. * @return a {@code char[]} with the uppercased character. * @since 1.4
*/ staticchar[] toUpperCaseCharArray(int codePoint) { // As of Unicode 6.0, 1:M uppercasings only happen in the BMP. assert isBmpCodePoint(codePoint); return CharacterData.of(codePoint).toUpperCaseCharArray(codePoint);
}
/** * The number of bits used to represent a {@code char} value in unsigned * binary form, constant {@code 16}. * * @since 1.5
*/ publicstaticfinalint SIZE = 16;
/** * The number of bytes used to represent a {@code char} value in unsigned * binary form. * * @since 1.8
*/ publicstaticfinalint BYTES = SIZE / Byte.SIZE;
/** * Returns the value obtained by reversing the order of the bytes in the * specified {@code char} value. * * @param ch The {@code char} of which to reverse the byte order. * @return the value obtained by reversing (or, equivalently, swapping) * the bytes in the specified {@code char} value. * @since 1.5
*/
@IntrinsicCandidate publicstaticchar reverseBytes(char ch) { return (char) (((ch & 0xFF00) >> 8) | (ch << 8));
}
/** * Returns the name of the specified character * {@code codePoint}, or null if the code point is * {@link #UNASSIGNED unassigned}. * <p> * If the specified character is not assigned a name by * the <i>UnicodeData</i> file (part of the Unicode Character * Database maintained by the Unicode Consortium), the returned * name is the same as the result of the expression: * * <blockquote>{@code * Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ') * + " " * + Integer.toHexString(codePoint).toUpperCase(Locale.ROOT); * * }</blockquote> * * For the {@code codePoint}s in the <i>UnicodeData</i> file, the name * returned by this method follows the naming scheme in the * "Unicode Name Property" section of the Unicode Standard. For other * code points, such as Hangul/Ideographs, The name generation rule above * differs from the one defined in the Unicode Standard. * * @param codePoint the character (Unicode code point) * * @return the name of the specified character, or null if * the code point is unassigned. * * @throws IllegalArgumentException if the specified * {@code codePoint} is not a valid Unicode * code point. * * @since 1.7
*/ publicstatic String getName(int codePoint) { if (!isValidCodePoint(codePoint)) { thrownew IllegalArgumentException(
String.format("Not a valid Unicode code point: 0x%X", codePoint));
}
String name = CharacterName.getInstance().getName(codePoint); if (name != null) return name; if (getType(codePoint) == UNASSIGNED) returnnull;
UnicodeBlock block = UnicodeBlock.of(codePoint); if (block != null) return block.toString().replace('_', ' ') + " "
+ Integer.toHexString(codePoint).toUpperCase(Locale.ROOT); // should never come here return Integer.toHexString(codePoint).toUpperCase(Locale.ROOT);
}
/** * Returns the code point value of the Unicode character specified by * the given character name. * <p> * If a character is not assigned a name by the <i>UnicodeData</i> * file (part of the Unicode Character Database maintained by the Unicode * Consortium), its name is defined as the result of the expression: * * <blockquote>{@code * Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ') * + " " * + Integer.toHexString(codePoint).toUpperCase(Locale.ROOT); * * }</blockquote> * <p> * The {@code name} matching is case insensitive, with any leading and * trailing whitespace character removed. * * For the code points in the <i>UnicodeData</i> file, this method * recognizes the name which conforms to the name defined in the * "Unicode Name Property" section in the Unicode Standard. For other * code points, this method recognizes the name generated with * {@link #getName(int)} method. * * @param name the character name * * @return the code point value of the character specified by its name. * * @throws IllegalArgumentException if the specified {@code name} * is not a valid character name. * @throws NullPointerException if {@code name} is {@code null} * * @since 9
*/ publicstaticint codePointOf(String name) {
name = name.trim().toUpperCase(Locale.ROOT); int cp = CharacterName.getInstance().getCodePoint(name); if (cp != -1) return cp; try { int off = name.lastIndexOf(' '); if (off != -1) {
cp = Integer.parseInt(name, off + 1, name.length(), 16); if (isValidCodePoint(cp) && name.equals(getName(cp))) return cp;
}
} catch (Exception x) {} thrownew IllegalArgumentException("Unrecognized character name :" + name);
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.732Bemerkung:
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-05-02)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.