Path: blob/master/src/java.base/share/classes/jdk/internal/icu/lang/UCharacterEnums.java
41161 views
/*1* Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/24/*25/**26*******************************************************************************27* Copyright (C) 2004, International Business Machines Corporation and *28* others. All Rights Reserved. *29*******************************************************************************30*/31// CHANGELOG32// 2005-05-19 Edward Wang33// - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterEnums.java34// - move from package com.ibm.icu.lang to package sun.net.idn35//36// 2011-09-06 Kurchi Subhra Hazra37// - Added @Deprecated tag to the following:38// - class UCharacterEnums39// - interfaces ECharacterCategory, ECharacterDirection40// - fields INITIAL_QUOTE_PUNCTUATION, FINAL_QUOTE_PUNCTUATION,41// DIRECTIONALITY_LEFT_TO_RIGHT, DIRECTIONALITY_RIGHT_TO_LEFT,42// DIRECTIONALITY_EUROPEAN_NUMBER, DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR43// DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR, DIRECTIONALITY_ARABIC_NUMBER,44// DIRECTIONALITY_COMMON_NUMBER_SEPARATOR, DIRECTIONALITY_PARAGRAPH_SEPARATOR,45// DIRECTIONALITY_SEGMENT_SEPARATOR, DIRECTIONALITY_WHITESPACE,46// DIRECTIONALITY_OTHER_NEUTRALS, DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING,47// DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE, DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC,48// DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING, DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE,49// DIRECTIONALITY_POP_DIRECTIONAL_FORMAT, DIRECTIONALITY_NON_SPACING_MARK,50// DIRECTIONALITY_BOUNDARY_NEUTRAL, DIRECTIONALITY_UNDEFINED51//5253package jdk.internal.icu.lang;5455/**56* A container for the different 'enumerated types' used by UCharacter.57* @draft ICU 3.058* @deprecated This is a draft API and might change in a future release of ICU.59*/6061@Deprecated62class UCharacterEnums {6364/** This is just a namespace, it is not instantiatable. */65private UCharacterEnums() {};6667/**68* 'Enum' for the CharacterCategory constants. These constants are69* compatible in name <b>but not in value</b> with those defined in70* <code>java.lang.Character</code>.71* @see UCharacterCategory72* @draft ICU 3.073* @deprecated This is a draft API and might change in a future release of ICU.74*/75@Deprecated76public static interface ECharacterCategory {77/**78* Unassigned character type79* @stable ICU 2.180*/81public static final int UNASSIGNED = 0;8283/**84* Character type Cn85* Not Assigned (no characters in [UnicodeData.txt] have this property)86* @stable ICU 2.687*/88public static final int GENERAL_OTHER_TYPES = 0;8990/**91* Character type Lu92* @stable ICU 2.193*/94public static final int UPPERCASE_LETTER = 1;9596/**97* Character type Ll98* @stable ICU 2.199*/100public static final int LOWERCASE_LETTER = 2;101102/**103* Character type Lt104* @stable ICU 2.1105*/106107public static final int TITLECASE_LETTER = 3;108109/**110* Character type Lm111* @stable ICU 2.1112*/113public static final int MODIFIER_LETTER = 4;114115/**116* Character type Lo117* @stable ICU 2.1118*/119public static final int OTHER_LETTER = 5;120121/**122* Character type Mn123* @stable ICU 2.1124*/125public static final int NON_SPACING_MARK = 6;126127/**128* Character type Me129* @stable ICU 2.1130*/131public static final int ENCLOSING_MARK = 7;132133/**134* Character type Mc135* @stable ICU 2.1136*/137public static final int COMBINING_SPACING_MARK = 8;138139/**140* Character type Nd141* @stable ICU 2.1142*/143public static final int DECIMAL_DIGIT_NUMBER = 9;144145/**146* Character type Nl147* @stable ICU 2.1148*/149public static final int LETTER_NUMBER = 10;150151/**152* Character type No153* @stable ICU 2.1154*/155public static final int OTHER_NUMBER = 11;156157/**158* Character type Zs159* @stable ICU 2.1160*/161public static final int SPACE_SEPARATOR = 12;162163/**164* Character type Zl165* @stable ICU 2.1166*/167public static final int LINE_SEPARATOR = 13;168169/**170* Character type Zp171* @stable ICU 2.1172*/173public static final int PARAGRAPH_SEPARATOR = 14;174175/**176* Character type Cc177* @stable ICU 2.1178*/179public static final int CONTROL = 15;180181/**182* Character type Cf183* @stable ICU 2.1184*/185public static final int FORMAT = 16;186187/**188* Character type Co189* @stable ICU 2.1190*/191public static final int PRIVATE_USE = 17;192193/**194* Character type Cs195* @stable ICU 2.1196*/197public static final int SURROGATE = 18;198199/**200* Character type Pd201* @stable ICU 2.1202*/203public static final int DASH_PUNCTUATION = 19;204205/**206* Character type Ps207* @stable ICU 2.1208*/209public static final int START_PUNCTUATION = 20;210211/**212* Character type Pe213* @stable ICU 2.1214*/215public static final int END_PUNCTUATION = 21;216217/**218* Character type Pc219* @stable ICU 2.1220*/221public static final int CONNECTOR_PUNCTUATION = 22;222223/**224* Character type Po225* @stable ICU 2.1226*/227public static final int OTHER_PUNCTUATION = 23;228229/**230* Character type Sm231* @stable ICU 2.1232*/233public static final int MATH_SYMBOL = 24;234235/**236* Character type Sc237* @stable ICU 2.1238*/239public static final int CURRENCY_SYMBOL = 25;240241/**242* Character type Sk243* @stable ICU 2.1244*/245public static final int MODIFIER_SYMBOL = 26;246247/**248* Character type So249* @stable ICU 2.1250*/251public static final int OTHER_SYMBOL = 27;252253/**254* Character type Pi255* @see #INITIAL_QUOTE_PUNCTUATION256* @stable ICU 2.1257*/258public static final int INITIAL_PUNCTUATION = 28;259260/**261* Character type Pi262* This name is compatible with java.lang.Character's name for this type.263* @see #INITIAL_PUNCTUATION264* @draft ICU 2.8265* @deprecated This is a draft API and might change in a future release of ICU.266*/267@Deprecated268public static final int INITIAL_QUOTE_PUNCTUATION = 28;269270/**271* Character type Pf272* @see #FINAL_QUOTE_PUNCTUATION273* @stable ICU 2.1274*/275public static final int FINAL_PUNCTUATION = 29;276277/**278* Character type Pf279* This name is compatible with java.lang.Character's name for this type.280* @see #FINAL_PUNCTUATION281* @draft ICU 2.8282* @deprecated This is a draft API and might change in a future release of ICU.283*/284@Deprecated285public static final int FINAL_QUOTE_PUNCTUATION = 29;286287/**288* Character type count289* @stable ICU 2.1290*/291public static final int CHAR_CATEGORY_COUNT = 30;292}293294/**295* 'Enum' for the CharacterDirection constants. There are two sets296* of names, those used in ICU, and those used in the JDK. The297* JDK constants are compatible in name <b>but not in value</b>298* with those defined in <code>java.lang.Character</code>.299* @see UCharacterDirection300* @draft ICU 3.0301* @deprecated This is a draft API and might change in a future release of ICU.302*/303304@Deprecated305public static interface ECharacterDirection {306/**307* Directional type L308* @stable ICU 2.1309*/310public static final int LEFT_TO_RIGHT = 0;311312/**313* JDK-compatible synonum for LEFT_TO_RIGHT.314* @draft ICU 3.0315* @deprecated This is a draft API and might change in a future release of ICU.316*/317@Deprecated318public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;319320/**321* Directional type R322* @stable ICU 2.1323*/324public static final int RIGHT_TO_LEFT = 1;325326/**327* JDK-compatible synonum for RIGHT_TO_LEFT.328* @draft ICU 3.0329* @deprecated This is a draft API and might change in a future release of ICU.330*/331@Deprecated332public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;333334/**335* Directional type EN336* @stable ICU 2.1337*/338public static final int EUROPEAN_NUMBER = 2;339340/**341* JDK-compatible synonum for EUROPEAN_NUMBER.342* @draft ICU 3.0343* @deprecated This is a draft API and might change in a future release of ICU.344*/345@Deprecated346public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;347348/**349* Directional type ES350* @stable ICU 2.1351*/352public static final int EUROPEAN_NUMBER_SEPARATOR = 3;353354/**355* JDK-compatible synonum for EUROPEAN_NUMBER_SEPARATOR.356* @draft ICU 3.0357* @deprecated This is a draft API and might change in a future release of ICU.358*/359@Deprecated360public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;361362/**363* Directional type ET364* @stable ICU 2.1365*/366public static final int EUROPEAN_NUMBER_TERMINATOR = 4;367368/**369* JDK-compatible synonum for EUROPEAN_NUMBER_TERMINATOR.370* @draft ICU 3.0371* @deprecated This is a draft API and might change in a future release of ICU.372*/373@Deprecated374public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;375376/**377* Directional type AN378* @stable ICU 2.1379*/380public static final int ARABIC_NUMBER = 5;381382/**383* JDK-compatible synonum for ARABIC_NUMBER.384* @draft ICU 3.0385* @deprecated This is a draft API and might change in a future release of ICU.386*/387@Deprecated388public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;389390/**391* Directional type CS392* @stable ICU 2.1393*/394public static final int COMMON_NUMBER_SEPARATOR = 6;395396/**397* JDK-compatible synonum for COMMON_NUMBER_SEPARATOR.398* @draft ICU 3.0399* @deprecated This is a draft API and might change in a future release of ICU.400*/401@Deprecated402public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;403404/**405* Directional type B406* @stable ICU 2.1407*/408public static final int BLOCK_SEPARATOR = 7;409410/**411* JDK-compatible synonum for BLOCK_SEPARATOR.412* @draft ICU 3.0413* @deprecated This is a draft API and might change in a future release of ICU.414*/415@Deprecated416public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;417418/**419* Directional type S420* @stable ICU 2.1421*/422public static final int SEGMENT_SEPARATOR = 8;423424/**425* JDK-compatible synonum for SEGMENT_SEPARATOR.426* @draft ICU 3.0427* @deprecated This is a draft API and might change in a future release of ICU.428*/429@Deprecated430public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;431432/**433* Directional type WS434* @stable ICU 2.1435*/436public static final int WHITE_SPACE_NEUTRAL = 9;437438/**439* JDK-compatible synonum for WHITE_SPACE_NEUTRAL.440* @draft ICU 3.0441* @deprecated This is a draft API and might change in a future release of ICU.442*/443@Deprecated444public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;445446/**447* Directional type ON448* @stable ICU 2.1449*/450public static final int OTHER_NEUTRAL = 10;451452/**453* JDK-compatible synonum for OTHER_NEUTRAL.454* @draft ICU 3.0455* @deprecated This is a draft API and might change in a future release of ICU.456*/457@Deprecated458public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;459460/**461* Directional type LRE462* @stable ICU 2.1463*/464public static final int LEFT_TO_RIGHT_EMBEDDING = 11;465466/**467* JDK-compatible synonum for LEFT_TO_RIGHT_EMBEDDING.468* @draft ICU 3.0469* @deprecated This is a draft API and might change in a future release of ICU.470*/471@Deprecated472public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;473474/**475* Directional type LRO476* @stable ICU 2.1477*/478public static final int LEFT_TO_RIGHT_OVERRIDE = 12;479480/**481* JDK-compatible synonum for LEFT_TO_RIGHT_OVERRIDE.482* @draft ICU 3.0483* @deprecated This is a draft API and might change in a future release of ICU.484*/485@Deprecated486public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;487488/**489* Directional type AL490* @stable ICU 2.1491*/492public static final int RIGHT_TO_LEFT_ARABIC = 13;493494/**495* JDK-compatible synonum for RIGHT_TO_LEFT_ARABIC.496* @draft ICU 3.0497* @deprecated This is a draft API and might change in a future release of ICU.498*/499@Deprecated500public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;501502/**503* Directional type RLE504* @stable ICU 2.1505*/506public static final int RIGHT_TO_LEFT_EMBEDDING = 14;507508/**509* JDK-compatible synonum for RIGHT_TO_LEFT_EMBEDDING.510* @draft ICU 3.0511* @deprecated This is a draft API and might change in a future release of ICU.512*/513@Deprecated514public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;515516/**517* Directional type RLO518* @stable ICU 2.1519*/520public static final int RIGHT_TO_LEFT_OVERRIDE = 15;521522/**523* JDK-compatible synonum for RIGHT_TO_LEFT_OVERRIDE.524* @draft ICU 3.0525* @deprecated This is a draft API and might change in a future release of ICU.526*/527@Deprecated528public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;529530/**531* Directional type PDF532* @stable ICU 2.1533*/534public static final int POP_DIRECTIONAL_FORMAT = 16;535536/**537* JDK-compatible synonum for POP_DIRECTIONAL_FORMAT.538* @draft ICU 3.0539* @deprecated This is a draft API and might change in a future release of ICU.540*/541@Deprecated542public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;543544/**545* Directional type NSM546* @stable ICU 2.1547*/548public static final int DIR_NON_SPACING_MARK = 17;549550/**551* JDK-compatible synonum for DIR_NON_SPACING_MARK.552* @draft ICU 3.0553* @deprecated This is a draft API and might change in a future release of ICU.554*/555@Deprecated556public static final byte DIRECTIONALITY_NON_SPACING_MARK = (byte)DIR_NON_SPACING_MARK;557558/**559* Directional type BN560* @stable ICU 2.1561*/562public static final int BOUNDARY_NEUTRAL = 18;563564/**565* JDK-compatible synonum for BOUNDARY_NEUTRAL.566* @draft ICU 3.0567* @deprecated This is a draft API and might change in a future release of ICU.568*/569@Deprecated570public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;571572/**573* Number of directional types574* @stable ICU 2.1575*/576public static final int CHAR_DIRECTION_COUNT = 19;577578/**579* Undefined bidirectional character type. Undefined <code>char</code>580* values have undefined directionality in the Unicode specification.581* @draft ICU 3.0582* @deprecated This is a draft API and might change in a future release of ICU.583*/584@Deprecated585public static final byte DIRECTIONALITY_UNDEFINED = -1;586}587}588589590