jdk/src/share/classes/sun/net/idn/UCharacterEnums.java
changeset 10596 39b3a979e600
parent 5506 202f599c92aa
equal deleted inserted replaced
10595:c5be3e19fbab 10596:39b3a979e600
    31 // CHANGELOG
    31 // CHANGELOG
    32 //      2005-05-19 Edward Wang
    32 //      2005-05-19 Edward Wang
    33 //          - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterEnums.java
    33 //          - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterEnums.java
    34 //          - move from package com.ibm.icu.lang to package sun.net.idn
    34 //          - move from package com.ibm.icu.lang to package sun.net.idn
    35 //
    35 //
       
    36 //      2011-09-06 Kurchi Subhra Hazra
       
    37 //          - Added @Deprecated tag to the following:
       
    38 //            - class UCharacterEnums
       
    39 //            - interfaces ECharacterCategory, ECharacterDirection
       
    40 //            - fields INITIAL_QUOTE_PUNCTUATION, FINAL_QUOTE_PUNCTUATION,
       
    41 //              DIRECTIONALITY_LEFT_TO_RIGHT, DIRECTIONALITY_RIGHT_TO_LEFT,
       
    42 //              DIRECTIONALITY_EUROPEAN_NUMBER, DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
       
    43 //              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_UNDEFINED
       
    51 //
    36 
    52 
    37 package sun.net.idn;
    53 package sun.net.idn;
    38 
    54 
    39 /**
    55 /**
    40  * A container for the different 'enumerated types' used by UCharacter.
    56  * A container for the different 'enumerated types' used by UCharacter.
    41  * @draft ICU 3.0
    57  * @draft ICU 3.0
    42  * @deprecated This is a draft API and might change in a future release of ICU.
    58  * @deprecated This is a draft API and might change in a future release of ICU.
    43  */
    59  */
       
    60 
       
    61 @Deprecated
    44 class UCharacterEnums {
    62 class UCharacterEnums {
    45 
    63 
    46     /** This is just a namespace, it is not instantiatable. */
    64     /** This is just a namespace, it is not instantiatable. */
    47     private UCharacterEnums() {};
    65     private UCharacterEnums() {};
    48 
    66 
    52      * <code>java.lang.Character</code>.
    70      * <code>java.lang.Character</code>.
    53      * @see UCharacterCategory
    71      * @see UCharacterCategory
    54      * @draft ICU 3.0
    72      * @draft ICU 3.0
    55      * @deprecated This is a draft API and might change in a future release of ICU.
    73      * @deprecated This is a draft API and might change in a future release of ICU.
    56      */
    74      */
       
    75     @Deprecated
    57     public static interface ECharacterCategory {
    76     public static interface ECharacterCategory {
    58         /**
    77         /**
    59          * Unassigned character type
    78          * Unassigned character type
    60          * @stable ICU 2.1
    79          * @stable ICU 2.1
    61          */
    80          */
   243          * This name is compatible with java.lang.Character's name for this type.
   262          * This name is compatible with java.lang.Character's name for this type.
   244          * @see #INITIAL_PUNCTUATION
   263          * @see #INITIAL_PUNCTUATION
   245          * @draft ICU 2.8
   264          * @draft ICU 2.8
   246      * @deprecated This is a draft API and might change in a future release of ICU.
   265      * @deprecated This is a draft API and might change in a future release of ICU.
   247          */
   266          */
       
   267         @Deprecated
   248         public static final int INITIAL_QUOTE_PUNCTUATION = 28;
   268         public static final int INITIAL_QUOTE_PUNCTUATION = 28;
   249 
   269 
   250         /**
   270         /**
   251          * Character type Pf
   271          * Character type Pf
   252          * @see #FINAL_QUOTE_PUNCTUATION
   272          * @see #FINAL_QUOTE_PUNCTUATION
   259          * This name is compatible with java.lang.Character's name for this type.
   279          * This name is compatible with java.lang.Character's name for this type.
   260          * @see #FINAL_PUNCTUATION
   280          * @see #FINAL_PUNCTUATION
   261          * @draft ICU 2.8
   281          * @draft ICU 2.8
   262      * @deprecated This is a draft API and might change in a future release of ICU.
   282      * @deprecated This is a draft API and might change in a future release of ICU.
   263          */
   283          */
       
   284         @Deprecated
   264         public static final int FINAL_QUOTE_PUNCTUATION   = 29;
   285         public static final int FINAL_QUOTE_PUNCTUATION   = 29;
   265 
   286 
   266         /**
   287         /**
   267          * Character type count
   288          * Character type count
   268          * @stable ICU 2.1
   289          * @stable ICU 2.1
   277      * with those defined in <code>java.lang.Character</code>.
   298      * with those defined in <code>java.lang.Character</code>.
   278      * @see UCharacterDirection
   299      * @see UCharacterDirection
   279      * @draft ICU 3.0
   300      * @draft ICU 3.0
   280      * @deprecated This is a draft API and might change in a future release of ICU.
   301      * @deprecated This is a draft API and might change in a future release of ICU.
   281      */
   302      */
       
   303 
       
   304     @Deprecated
   282     public static interface ECharacterDirection {
   305     public static interface ECharacterDirection {
   283         /**
   306         /**
   284          * Directional type L
   307          * Directional type L
   285          * @stable ICU 2.1
   308          * @stable ICU 2.1
   286          */
   309          */
   289         /**
   312         /**
   290          * JDK-compatible synonum for LEFT_TO_RIGHT.
   313          * JDK-compatible synonum for LEFT_TO_RIGHT.
   291          * @draft ICU 3.0
   314          * @draft ICU 3.0
   292      * @deprecated This is a draft API and might change in a future release of ICU.
   315      * @deprecated This is a draft API and might change in a future release of ICU.
   293          */
   316          */
       
   317         @Deprecated
   294         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;
   318         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;
   295 
   319 
   296         /**
   320         /**
   297          * Directional type R
   321          * Directional type R
   298          * @stable ICU 2.1
   322          * @stable ICU 2.1
   302         /**
   326         /**
   303          * JDK-compatible synonum for RIGHT_TO_LEFT.
   327          * JDK-compatible synonum for RIGHT_TO_LEFT.
   304          * @draft ICU 3.0
   328          * @draft ICU 3.0
   305      * @deprecated This is a draft API and might change in a future release of ICU.
   329      * @deprecated This is a draft API and might change in a future release of ICU.
   306          */
   330          */
       
   331         @Deprecated
   307         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;
   332         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;
   308 
   333 
   309         /**
   334         /**
   310          * Directional type EN
   335          * Directional type EN
   311          * @stable ICU 2.1
   336          * @stable ICU 2.1
   315         /**
   340         /**
   316          * JDK-compatible synonum for EUROPEAN_NUMBER.
   341          * JDK-compatible synonum for EUROPEAN_NUMBER.
   317          * @draft ICU 3.0
   342          * @draft ICU 3.0
   318      * @deprecated This is a draft API and might change in a future release of ICU.
   343      * @deprecated This is a draft API and might change in a future release of ICU.
   319          */
   344          */
       
   345         @Deprecated
   320         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;
   346         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;
   321 
   347 
   322         /**
   348         /**
   323          * Directional type ES
   349          * Directional type ES
   324          * @stable ICU 2.1
   350          * @stable ICU 2.1
   328         /**
   354         /**
   329          * JDK-compatible synonum for EUROPEAN_NUMBER_SEPARATOR.
   355          * JDK-compatible synonum for EUROPEAN_NUMBER_SEPARATOR.
   330          * @draft ICU 3.0
   356          * @draft ICU 3.0
   331      * @deprecated This is a draft API and might change in a future release of ICU.
   357      * @deprecated This is a draft API and might change in a future release of ICU.
   332          */
   358          */
       
   359         @Deprecated
   333         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;
   360         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;
   334 
   361 
   335         /**
   362         /**
   336          * Directional type ET
   363          * Directional type ET
   337          * @stable ICU 2.1
   364          * @stable ICU 2.1
   341         /**
   368         /**
   342          * JDK-compatible synonum for EUROPEAN_NUMBER_TERMINATOR.
   369          * JDK-compatible synonum for EUROPEAN_NUMBER_TERMINATOR.
   343          * @draft ICU 3.0
   370          * @draft ICU 3.0
   344      * @deprecated This is a draft API and might change in a future release of ICU.
   371      * @deprecated This is a draft API and might change in a future release of ICU.
   345          */
   372          */
       
   373         @Deprecated
   346         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;
   374         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;
   347 
   375 
   348         /**
   376         /**
   349          * Directional type AN
   377          * Directional type AN
   350          * @stable ICU 2.1
   378          * @stable ICU 2.1
   354         /**
   382         /**
   355          * JDK-compatible synonum for ARABIC_NUMBER.
   383          * JDK-compatible synonum for ARABIC_NUMBER.
   356          * @draft ICU 3.0
   384          * @draft ICU 3.0
   357      * @deprecated This is a draft API and might change in a future release of ICU.
   385      * @deprecated This is a draft API and might change in a future release of ICU.
   358          */
   386          */
       
   387         @Deprecated
   359         public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;
   388         public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;
   360 
   389 
   361         /**
   390         /**
   362          * Directional type CS
   391          * Directional type CS
   363          * @stable ICU 2.1
   392          * @stable ICU 2.1
   367         /**
   396         /**
   368          * JDK-compatible synonum for COMMON_NUMBER_SEPARATOR.
   397          * JDK-compatible synonum for COMMON_NUMBER_SEPARATOR.
   369          * @draft ICU 3.0
   398          * @draft ICU 3.0
   370      * @deprecated This is a draft API and might change in a future release of ICU.
   399      * @deprecated This is a draft API and might change in a future release of ICU.
   371          */
   400          */
       
   401         @Deprecated
   372         public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;
   402         public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;
   373 
   403 
   374         /**
   404         /**
   375          * Directional type B
   405          * Directional type B
   376          * @stable ICU 2.1
   406          * @stable ICU 2.1
   380         /**
   410         /**
   381          * JDK-compatible synonum for BLOCK_SEPARATOR.
   411          * JDK-compatible synonum for BLOCK_SEPARATOR.
   382          * @draft ICU 3.0
   412          * @draft ICU 3.0
   383      * @deprecated This is a draft API and might change in a future release of ICU.
   413      * @deprecated This is a draft API and might change in a future release of ICU.
   384          */
   414          */
       
   415         @Deprecated
   385         public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;
   416         public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;
   386 
   417 
   387         /**
   418         /**
   388          * Directional type S
   419          * Directional type S
   389          * @stable ICU 2.1
   420          * @stable ICU 2.1
   393         /**
   424         /**
   394          * JDK-compatible synonum for SEGMENT_SEPARATOR.
   425          * JDK-compatible synonum for SEGMENT_SEPARATOR.
   395          * @draft ICU 3.0
   426          * @draft ICU 3.0
   396      * @deprecated This is a draft API and might change in a future release of ICU.
   427      * @deprecated This is a draft API and might change in a future release of ICU.
   397          */
   428          */
       
   429         @Deprecated
   398         public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;
   430         public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;
   399 
   431 
   400         /**
   432         /**
   401          * Directional type WS
   433          * Directional type WS
   402          * @stable ICU 2.1
   434          * @stable ICU 2.1
   406         /**
   438         /**
   407          * JDK-compatible synonum for WHITE_SPACE_NEUTRAL.
   439          * JDK-compatible synonum for WHITE_SPACE_NEUTRAL.
   408          * @draft ICU 3.0
   440          * @draft ICU 3.0
   409      * @deprecated This is a draft API and might change in a future release of ICU.
   441      * @deprecated This is a draft API and might change in a future release of ICU.
   410          */
   442          */
       
   443         @Deprecated
   411         public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;
   444         public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;
   412 
   445 
   413         /**
   446         /**
   414          * Directional type ON
   447          * Directional type ON
   415          * @stable ICU 2.1
   448          * @stable ICU 2.1
   419         /**
   452         /**
   420          * JDK-compatible synonum for OTHER_NEUTRAL.
   453          * JDK-compatible synonum for OTHER_NEUTRAL.
   421          * @draft ICU 3.0
   454          * @draft ICU 3.0
   422      * @deprecated This is a draft API and might change in a future release of ICU.
   455      * @deprecated This is a draft API and might change in a future release of ICU.
   423          */
   456          */
       
   457         @Deprecated
   424         public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;
   458         public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;
   425 
   459 
   426         /**
   460         /**
   427          * Directional type LRE
   461          * Directional type LRE
   428          * @stable ICU 2.1
   462          * @stable ICU 2.1
   432         /**
   466         /**
   433          * JDK-compatible synonum for LEFT_TO_RIGHT_EMBEDDING.
   467          * JDK-compatible synonum for LEFT_TO_RIGHT_EMBEDDING.
   434          * @draft ICU 3.0
   468          * @draft ICU 3.0
   435      * @deprecated This is a draft API and might change in a future release of ICU.
   469      * @deprecated This is a draft API and might change in a future release of ICU.
   436          */
   470          */
       
   471         @Deprecated
   437         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;
   472         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;
   438 
   473 
   439         /**
   474         /**
   440          * Directional type LRO
   475          * Directional type LRO
   441          * @stable ICU 2.1
   476          * @stable ICU 2.1
   445         /**
   480         /**
   446          * JDK-compatible synonum for LEFT_TO_RIGHT_OVERRIDE.
   481          * JDK-compatible synonum for LEFT_TO_RIGHT_OVERRIDE.
   447          * @draft ICU 3.0
   482          * @draft ICU 3.0
   448      * @deprecated This is a draft API and might change in a future release of ICU.
   483      * @deprecated This is a draft API and might change in a future release of ICU.
   449          */
   484          */
       
   485         @Deprecated
   450         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;
   486         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;
   451 
   487 
   452         /**
   488         /**
   453          * Directional type AL
   489          * Directional type AL
   454          * @stable ICU 2.1
   490          * @stable ICU 2.1
   458         /**
   494         /**
   459          * JDK-compatible synonum for RIGHT_TO_LEFT_ARABIC.
   495          * JDK-compatible synonum for RIGHT_TO_LEFT_ARABIC.
   460          * @draft ICU 3.0
   496          * @draft ICU 3.0
   461      * @deprecated This is a draft API and might change in a future release of ICU.
   497      * @deprecated This is a draft API and might change in a future release of ICU.
   462          */
   498          */
       
   499         @Deprecated
   463         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;
   500         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;
   464 
   501 
   465         /**
   502         /**
   466          * Directional type RLE
   503          * Directional type RLE
   467          * @stable ICU 2.1
   504          * @stable ICU 2.1
   471         /**
   508         /**
   472          * JDK-compatible synonum for RIGHT_TO_LEFT_EMBEDDING.
   509          * JDK-compatible synonum for RIGHT_TO_LEFT_EMBEDDING.
   473          * @draft ICU 3.0
   510          * @draft ICU 3.0
   474      * @deprecated This is a draft API and might change in a future release of ICU.
   511      * @deprecated This is a draft API and might change in a future release of ICU.
   475          */
   512          */
       
   513         @Deprecated
   476         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;
   514         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;
   477 
   515 
   478         /**
   516         /**
   479          * Directional type RLO
   517          * Directional type RLO
   480          * @stable ICU 2.1
   518          * @stable ICU 2.1
   484         /**
   522         /**
   485          * JDK-compatible synonum for RIGHT_TO_LEFT_OVERRIDE.
   523          * JDK-compatible synonum for RIGHT_TO_LEFT_OVERRIDE.
   486          * @draft ICU 3.0
   524          * @draft ICU 3.0
   487      * @deprecated This is a draft API and might change in a future release of ICU.
   525      * @deprecated This is a draft API and might change in a future release of ICU.
   488          */
   526          */
       
   527         @Deprecated
   489         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;
   528         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;
   490 
   529 
   491         /**
   530         /**
   492          * Directional type PDF
   531          * Directional type PDF
   493          * @stable ICU 2.1
   532          * @stable ICU 2.1
   497         /**
   536         /**
   498          * JDK-compatible synonum for POP_DIRECTIONAL_FORMAT.
   537          * JDK-compatible synonum for POP_DIRECTIONAL_FORMAT.
   499          * @draft ICU 3.0
   538          * @draft ICU 3.0
   500      * @deprecated This is a draft API and might change in a future release of ICU.
   539      * @deprecated This is a draft API and might change in a future release of ICU.
   501          */
   540          */
       
   541         @Deprecated
   502         public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;
   542         public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;
   503 
   543 
   504         /**
   544         /**
   505          * Directional type NSM
   545          * Directional type NSM
   506          * @stable ICU 2.1
   546          * @stable ICU 2.1
   510         /**
   550         /**
   511          * JDK-compatible synonum for DIR_NON_SPACING_MARK.
   551          * JDK-compatible synonum for DIR_NON_SPACING_MARK.
   512          * @draft ICU 3.0
   552          * @draft ICU 3.0
   513      * @deprecated This is a draft API and might change in a future release of ICU.
   553      * @deprecated This is a draft API and might change in a future release of ICU.
   514          */
   554          */
       
   555         @Deprecated
   515         public static final byte DIRECTIONALITY_NON_SPACING_MARK = (byte)DIR_NON_SPACING_MARK;
   556         public static final byte DIRECTIONALITY_NON_SPACING_MARK = (byte)DIR_NON_SPACING_MARK;
   516 
   557 
   517         /**
   558         /**
   518          * Directional type BN
   559          * Directional type BN
   519          * @stable ICU 2.1
   560          * @stable ICU 2.1
   523         /**
   564         /**
   524          * JDK-compatible synonum for BOUNDARY_NEUTRAL.
   565          * JDK-compatible synonum for BOUNDARY_NEUTRAL.
   525          * @draft ICU 3.0
   566          * @draft ICU 3.0
   526      * @deprecated This is a draft API and might change in a future release of ICU.
   567      * @deprecated This is a draft API and might change in a future release of ICU.
   527          */
   568          */
       
   569         @Deprecated
   528         public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;
   570         public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;
   529 
   571 
   530         /**
   572         /**
   531          * Number of directional types
   573          * Number of directional types
   532          * @stable ICU 2.1
   574          * @stable ICU 2.1
   537          * Undefined bidirectional character type. Undefined <code>char</code>
   579          * Undefined bidirectional character type. Undefined <code>char</code>
   538          * values have undefined directionality in the Unicode specification.
   580          * values have undefined directionality in the Unicode specification.
   539      * @draft ICU 3.0
   581      * @draft ICU 3.0
   540      * @deprecated This is a draft API and might change in a future release of ICU.
   582      * @deprecated This is a draft API and might change in a future release of ICU.
   541          */
   583          */
       
   584         @Deprecated
   542         public static final byte DIRECTIONALITY_UNDEFINED = -1;
   585         public static final byte DIRECTIONALITY_UNDEFINED = -1;
   543     }
   586     }
   544 }
   587 }