Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/net/idn/UCharacterEnums.java
38918 views
/*1* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2*3* This code is free software; you can redistribute it and/or modify it4* under the terms of the GNU General Public License version 2 only, as5* published by the Free Software Foundation. Oracle designates this6* particular file as subject to the "Classpath" exception as provided7* by Oracle in the LICENSE file that accompanied this code.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 2 along with this work; if not, write to the Free Software Foundation,17* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18*19* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*/23/*24/**25*******************************************************************************26* Copyright (C) 2004, International Business Machines Corporation and *27* others. All Rights Reserved. *28*******************************************************************************29*/30// CHANGELOG31// 2005-05-19 Edward Wang32// - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterEnums.java33// - move from package com.ibm.icu.lang to package sun.net.idn34//35// 2011-09-06 Kurchi Subhra Hazra36// - Added @Deprecated tag to the following:37// - class UCharacterEnums38// - interfaces ECharacterCategory, ECharacterDirection39// - fields INITIAL_QUOTE_PUNCTUATION, FINAL_QUOTE_PUNCTUATION,40// DIRECTIONALITY_LEFT_TO_RIGHT, DIRECTIONALITY_RIGHT_TO_LEFT,41// DIRECTIONALITY_EUROPEAN_NUMBER, DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR42// DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR, DIRECTIONALITY_ARABIC_NUMBER,43// DIRECTIONALITY_COMMON_NUMBER_SEPARATOR, DIRECTIONALITY_PARAGRAPH_SEPARATOR,44// DIRECTIONALITY_SEGMENT_SEPARATOR, DIRECTIONALITY_WHITESPACE,45// DIRECTIONALITY_OTHER_NEUTRALS, DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING,46// DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE, DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC,47// DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING, DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE,48// DIRECTIONALITY_POP_DIRECTIONAL_FORMAT, DIRECTIONALITY_NON_SPACING_MARK,49// DIRECTIONALITY_BOUNDARY_NEUTRAL, DIRECTIONALITY_UNDEFINED50//5152package sun.net.idn;5354/**55* A container for the different 'enumerated types' used by UCharacter.56* @draft ICU 3.057* @deprecated This is a draft API and might change in a future release of ICU.58*/5960@Deprecated61class UCharacterEnums {6263/** This is just a namespace, it is not instantiatable. */64private UCharacterEnums() {};6566/**67* 'Enum' for the CharacterCategory constants. These constants are68* compatible in name <b>but not in value</b> with those defined in69* <code>java.lang.Character</code>.70* @see UCharacterCategory71* @draft ICU 3.072* @deprecated This is a draft API and might change in a future release of ICU.73*/74@Deprecated75public static interface ECharacterCategory {76/**77* Unassigned character type78* @stable ICU 2.179*/80public static final int UNASSIGNED = 0;8182/**83* Character type Cn84* Not Assigned (no characters in [UnicodeData.txt] have this property)85* @stable ICU 2.686*/87public static final int GENERAL_OTHER_TYPES = 0;8889/**90* Character type Lu91* @stable ICU 2.192*/93public static final int UPPERCASE_LETTER = 1;9495/**96* Character type Ll97* @stable ICU 2.198*/99public static final int LOWERCASE_LETTER = 2;100101/**102* Character type Lt103* @stable ICU 2.1104*/105106public static final int TITLECASE_LETTER = 3;107108/**109* Character type Lm110* @stable ICU 2.1111*/112public static final int MODIFIER_LETTER = 4;113114/**115* Character type Lo116* @stable ICU 2.1117*/118public static final int OTHER_LETTER = 5;119120/**121* Character type Mn122* @stable ICU 2.1123*/124public static final int NON_SPACING_MARK = 6;125126/**127* Character type Me128* @stable ICU 2.1129*/130public static final int ENCLOSING_MARK = 7;131132/**133* Character type Mc134* @stable ICU 2.1135*/136public static final int COMBINING_SPACING_MARK = 8;137138/**139* Character type Nd140* @stable ICU 2.1141*/142public static final int DECIMAL_DIGIT_NUMBER = 9;143144/**145* Character type Nl146* @stable ICU 2.1147*/148public static final int LETTER_NUMBER = 10;149150/**151* Character type No152* @stable ICU 2.1153*/154public static final int OTHER_NUMBER = 11;155156/**157* Character type Zs158* @stable ICU 2.1159*/160public static final int SPACE_SEPARATOR = 12;161162/**163* Character type Zl164* @stable ICU 2.1165*/166public static final int LINE_SEPARATOR = 13;167168/**169* Character type Zp170* @stable ICU 2.1171*/172public static final int PARAGRAPH_SEPARATOR = 14;173174/**175* Character type Cc176* @stable ICU 2.1177*/178public static final int CONTROL = 15;179180/**181* Character type Cf182* @stable ICU 2.1183*/184public static final int FORMAT = 16;185186/**187* Character type Co188* @stable ICU 2.1189*/190public static final int PRIVATE_USE = 17;191192/**193* Character type Cs194* @stable ICU 2.1195*/196public static final int SURROGATE = 18;197198/**199* Character type Pd200* @stable ICU 2.1201*/202public static final int DASH_PUNCTUATION = 19;203204/**205* Character type Ps206* @stable ICU 2.1207*/208public static final int START_PUNCTUATION = 20;209210/**211* Character type Pe212* @stable ICU 2.1213*/214public static final int END_PUNCTUATION = 21;215216/**217* Character type Pc218* @stable ICU 2.1219*/220public static final int CONNECTOR_PUNCTUATION = 22;221222/**223* Character type Po224* @stable ICU 2.1225*/226public static final int OTHER_PUNCTUATION = 23;227228/**229* Character type Sm230* @stable ICU 2.1231*/232public static final int MATH_SYMBOL = 24;233234/**235* Character type Sc236* @stable ICU 2.1237*/238public static final int CURRENCY_SYMBOL = 25;239240/**241* Character type Sk242* @stable ICU 2.1243*/244public static final int MODIFIER_SYMBOL = 26;245246/**247* Character type So248* @stable ICU 2.1249*/250public static final int OTHER_SYMBOL = 27;251252/**253* Character type Pi254* @see #INITIAL_QUOTE_PUNCTUATION255* @stable ICU 2.1256*/257public static final int INITIAL_PUNCTUATION = 28;258259/**260* Character type Pi261* This name is compatible with java.lang.Character's name for this type.262* @see #INITIAL_PUNCTUATION263* @draft ICU 2.8264* @deprecated This is a draft API and might change in a future release of ICU.265*/266@Deprecated267public static final int INITIAL_QUOTE_PUNCTUATION = 28;268269/**270* Character type Pf271* @see #FINAL_QUOTE_PUNCTUATION272* @stable ICU 2.1273*/274public static final int FINAL_PUNCTUATION = 29;275276/**277* Character type Pf278* This name is compatible with java.lang.Character's name for this type.279* @see #FINAL_PUNCTUATION280* @draft ICU 2.8281* @deprecated This is a draft API and might change in a future release of ICU.282*/283@Deprecated284public static final int FINAL_QUOTE_PUNCTUATION = 29;285286/**287* Character type count288* @stable ICU 2.1289*/290public static final int CHAR_CATEGORY_COUNT = 30;291}292293/**294* 'Enum' for the CharacterDirection constants. There are two sets295* of names, those used in ICU, and those used in the JDK. The296* JDK constants are compatible in name <b>but not in value</b>297* with those defined in <code>java.lang.Character</code>.298* @see UCharacterDirection299* @draft ICU 3.0300* @deprecated This is a draft API and might change in a future release of ICU.301*/302303@Deprecated304public static interface ECharacterDirection {305/**306* Directional type L307* @stable ICU 2.1308*/309public static final int LEFT_TO_RIGHT = 0;310311/**312* JDK-compatible synonum for LEFT_TO_RIGHT.313* @draft ICU 3.0314* @deprecated This is a draft API and might change in a future release of ICU.315*/316@Deprecated317public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;318319/**320* Directional type R321* @stable ICU 2.1322*/323public static final int RIGHT_TO_LEFT = 1;324325/**326* JDK-compatible synonum for RIGHT_TO_LEFT.327* @draft ICU 3.0328* @deprecated This is a draft API and might change in a future release of ICU.329*/330@Deprecated331public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;332333/**334* Directional type EN335* @stable ICU 2.1336*/337public static final int EUROPEAN_NUMBER = 2;338339/**340* JDK-compatible synonum for EUROPEAN_NUMBER.341* @draft ICU 3.0342* @deprecated This is a draft API and might change in a future release of ICU.343*/344@Deprecated345public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;346347/**348* Directional type ES349* @stable ICU 2.1350*/351public static final int EUROPEAN_NUMBER_SEPARATOR = 3;352353/**354* JDK-compatible synonum for EUROPEAN_NUMBER_SEPARATOR.355* @draft ICU 3.0356* @deprecated This is a draft API and might change in a future release of ICU.357*/358@Deprecated359public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;360361/**362* Directional type ET363* @stable ICU 2.1364*/365public static final int EUROPEAN_NUMBER_TERMINATOR = 4;366367/**368* JDK-compatible synonum for EUROPEAN_NUMBER_TERMINATOR.369* @draft ICU 3.0370* @deprecated This is a draft API and might change in a future release of ICU.371*/372@Deprecated373public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;374375/**376* Directional type AN377* @stable ICU 2.1378*/379public static final int ARABIC_NUMBER = 5;380381/**382* JDK-compatible synonum for ARABIC_NUMBER.383* @draft ICU 3.0384* @deprecated This is a draft API and might change in a future release of ICU.385*/386@Deprecated387public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;388389/**390* Directional type CS391* @stable ICU 2.1392*/393public static final int COMMON_NUMBER_SEPARATOR = 6;394395/**396* JDK-compatible synonum for COMMON_NUMBER_SEPARATOR.397* @draft ICU 3.0398* @deprecated This is a draft API and might change in a future release of ICU.399*/400@Deprecated401public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;402403/**404* Directional type B405* @stable ICU 2.1406*/407public static final int BLOCK_SEPARATOR = 7;408409/**410* JDK-compatible synonum for BLOCK_SEPARATOR.411* @draft ICU 3.0412* @deprecated This is a draft API and might change in a future release of ICU.413*/414@Deprecated415public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;416417/**418* Directional type S419* @stable ICU 2.1420*/421public static final int SEGMENT_SEPARATOR = 8;422423/**424* JDK-compatible synonum for SEGMENT_SEPARATOR.425* @draft ICU 3.0426* @deprecated This is a draft API and might change in a future release of ICU.427*/428@Deprecated429public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;430431/**432* Directional type WS433* @stable ICU 2.1434*/435public static final int WHITE_SPACE_NEUTRAL = 9;436437/**438* JDK-compatible synonum for WHITE_SPACE_NEUTRAL.439* @draft ICU 3.0440* @deprecated This is a draft API and might change in a future release of ICU.441*/442@Deprecated443public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;444445/**446* Directional type ON447* @stable ICU 2.1448*/449public static final int OTHER_NEUTRAL = 10;450451/**452* JDK-compatible synonum for OTHER_NEUTRAL.453* @draft ICU 3.0454* @deprecated This is a draft API and might change in a future release of ICU.455*/456@Deprecated457public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;458459/**460* Directional type LRE461* @stable ICU 2.1462*/463public static final int LEFT_TO_RIGHT_EMBEDDING = 11;464465/**466* JDK-compatible synonum for LEFT_TO_RIGHT_EMBEDDING.467* @draft ICU 3.0468* @deprecated This is a draft API and might change in a future release of ICU.469*/470@Deprecated471public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;472473/**474* Directional type LRO475* @stable ICU 2.1476*/477public static final int LEFT_TO_RIGHT_OVERRIDE = 12;478479/**480* JDK-compatible synonum for LEFT_TO_RIGHT_OVERRIDE.481* @draft ICU 3.0482* @deprecated This is a draft API and might change in a future release of ICU.483*/484@Deprecated485public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;486487/**488* Directional type AL489* @stable ICU 2.1490*/491public static final int RIGHT_TO_LEFT_ARABIC = 13;492493/**494* JDK-compatible synonum for RIGHT_TO_LEFT_ARABIC.495* @draft ICU 3.0496* @deprecated This is a draft API and might change in a future release of ICU.497*/498@Deprecated499public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;500501/**502* Directional type RLE503* @stable ICU 2.1504*/505public static final int RIGHT_TO_LEFT_EMBEDDING = 14;506507/**508* JDK-compatible synonum for RIGHT_TO_LEFT_EMBEDDING.509* @draft ICU 3.0510* @deprecated This is a draft API and might change in a future release of ICU.511*/512@Deprecated513public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;514515/**516* Directional type RLO517* @stable ICU 2.1518*/519public static final int RIGHT_TO_LEFT_OVERRIDE = 15;520521/**522* JDK-compatible synonum for RIGHT_TO_LEFT_OVERRIDE.523* @draft ICU 3.0524* @deprecated This is a draft API and might change in a future release of ICU.525*/526@Deprecated527public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;528529/**530* Directional type PDF531* @stable ICU 2.1532*/533public static final int POP_DIRECTIONAL_FORMAT = 16;534535/**536* JDK-compatible synonum for POP_DIRECTIONAL_FORMAT.537* @draft ICU 3.0538* @deprecated This is a draft API and might change in a future release of ICU.539*/540@Deprecated541public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;542543/**544* Directional type NSM545* @stable ICU 2.1546*/547public static final int DIR_NON_SPACING_MARK = 17;548549/**550* JDK-compatible synonum for DIR_NON_SPACING_MARK.551* @draft ICU 3.0552* @deprecated This is a draft API and might change in a future release of ICU.553*/554@Deprecated555public static final byte DIRECTIONALITY_NON_SPACING_MARK = (byte)DIR_NON_SPACING_MARK;556557/**558* Directional type BN559* @stable ICU 2.1560*/561public static final int BOUNDARY_NEUTRAL = 18;562563/**564* JDK-compatible synonum for BOUNDARY_NEUTRAL.565* @draft ICU 3.0566* @deprecated This is a draft API and might change in a future release of ICU.567*/568@Deprecated569public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;570571/**572* Number of directional types573* @stable ICU 2.1574*/575public static final int CHAR_DIRECTION_COUNT = 19;576577/**578* Undefined bidirectional character type. Undefined <code>char</code>579* values have undefined directionality in the Unicode specification.580* @draft ICU 3.0581* @deprecated This is a draft API and might change in a future release of ICU.582*/583@Deprecated584public static final byte DIRECTIONALITY_UNDEFINED = -1;585}586}587588589