<pre>Hello All,<br><br>I would like to work on this RFE.<br>This change is quite simple and gives greater value to the Character class.<br>The change can be done without breaking any existing code by adding the following enums in the Character class.<br>
<br>   /**<br>    * An enum for all the GeneralCategory values. The ordinal values for these enums are compatible with the<br>    * corresponding byte values as returned by the getType method.<br>    * @since  1.7 <br>    */<br>
    public enum GeneralCategory {<br>        /**<br>         * General category "Cn" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             UNASSIGNED("Cn"),//                  = 0;<br>
<br>        /**<br>         * General category "Lu" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             UPPERCASE_LETTER("Lu"),//            = 1;<br><br>        /**<br>
         * General category "Ll" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             LOWERCASE_LETTER("Ll"),//            = 2;<br><br>        /**<br>         * General category "Lt" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             TITLECASE_LETTER("Lt"),//            = 3;<br><br>        /**<br>         * General category "Lm" in the Unicode specification.<br>         * @since   1.7<br>
         */<br>             MODIFIER_LETTER("Lm"),//             = 4;<br><br>        /**<br>         * General category "Lo" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             OTHER_LETTER("Lo"),//                = 5;<br>
<br>        /**<br>         * General category "Mn" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             NON_SPACING_MARK("Mn"),//            = 6;<br><br>        /**<br>
         * General category "Me" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             ENCLOSING_MARK("Me"),//              = 7;<br><br>        /**<br>         * General category "Mc" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             COMBINING_SPACING_MARK("Mc"),//      = 8;<br><br>        /**<br>         * General category "Nd" in the Unicode specification.<br>         * @since   1.7<br>
         */<br>             DECIMAL_DIGIT_NUMBER("Nd"),//        = 9;<br><br>        /**<br>         * General category "Nl" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             LETTER_NUMBER("Nl"),//               = 10;<br>
<br>        /**<br>         * General category "No" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             OTHER_NUMBER("No"),//                = 11;<br><br>        /**<br>
         * General category "Zs" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             SPACE_SEPARATOR("Zs"),//             = 12;<br><br>        /**<br>         * General category "Zl" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             LINE_SEPARATOR("Zl"),//              = 13;<br><br>        /**<br>         * General category "Zp" in the Unicode specification.<br>         * @since   1.7<br>
         */<br>             PARAGRAPH_SEPARATOR("Zp"),//         = 14;<br><br>        /**<br>         * General category "Cc" in the Unicode specification.<br>         * @since   1.7<br>         */<br>
             CONTROL("Cc"),//                     = 15;<br><br>        /**<br>         * General category "Cf" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             FORMAT("Cf"),//                      = 16;<br>
<br>             /**<br>              * Filler<br>              * @since   1.7<br>              */<br>                  UNKNOWN(null),//                      = 17;<br><br>        /**<br>         * General category "Co" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             PRIVATE_USE("Co"),//                 = 18;<br><br>        /**<br>         * General category "Cs" in the Unicode specification.<br>         * @since   1.7<br>
         */<br>             SURROGATE("Cs"),//                   = 19;<br><br>        /**<br>         * General category "Pd" in the Unicode specification.<br>         * @since   1.7<br>         */<br>
             DASH_PUNCTUATION("Pd"),//            = 20;<br><br>        /**<br>         * General category "Ps" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             START_PUNCTUATION("Ps"),//           = 21;<br>
<br>        /**<br>         * General category "Pe" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             END_PUNCTUATION("Pe"),//             = 22;<br><br>        /**<br>
         * General category "Pc" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             CONNECTOR_PUNCTUATION("Pc"),//       = 23;<br><br>        /**<br>         * General category "Po" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             OTHER_PUNCTUATION("Po"),//           = 24;<br><br>        /**<br>         * General category "Sm" in the Unicode specification.<br>         * @since   1.7<br>
         */<br>             MATH_SYMBOL("Sm"),//                 = 25;<br><br>        /**<br>         * General category "Sc" in the Unicode specification.<br>         * @since   1.7<br>         */<br>
             CURRENCY_SYMBOL("Sc"),//             = 26;<br><br>        /**<br>         * General category "Sk" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             MODIFIER_SYMBOL("Sk"),//             = 27;<br>
<br>        /**<br>         * General category "So" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             OTHER_SYMBOL("So"),//                = 28;<br><br>        /**<br>
         * General category "Pi" in the Unicode specification.<br>         * @since   1.7<br>         */<br>             INITIAL_QUOTE_PUNCTUATION("Pi"),//   = 29;<br><br>        /**<br>         * General category "Pf" in the Unicode specification.<br>
         * @since   1.7<br>         */<br>             FINAL_QUOTE_PUNCTUATION("Pf"),//     = 30;<br>             ;<br>             /**<br>              * The abbreviated name of the general category as available from the UCD.<br>
              * <br>              */<br>             private String abbreviatedName;<br>             /**<br>              * The constructor requires the abbreviated name as parameter<br>              * @param abbrName - abreviated Name for the general category<br>
              * <br>              */<br>             private GeneralCategory(String abbrName) {<br>                 this.abbreviatedName = abbrName;<br>             }<br>             /**<br>              * This method returns the abbreviated name for the general category represented by this instance.<br>
              * @return - abbreviated name for the general category.<br>              */<br>             public String getAbbreviatedName() {<br>                 return abbreviatedName;<br>             }<br>    }<br><br><br>
   /**<br>    * An enum for all the Directionality values. The ordinal values for these enums are compatible with the<br>    * corresponding byte values as returned by the getDirectionality method. <br>    */<br><br>    public enum Directionality {<br>
        /**<br>         * Strong bidirectional character type "L" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_LEFT_TO_RIGHT("L"),// = 0;<br><br>        /**<br>
         * Strong bidirectional character type "R" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_RIGHT_TO_LEFT("R"),// = 1;<br><br>        /**<br>        * Strong bidirectional character type "AL" in the Unicode specification.<br>
         * @since 1.4<br>         */<br>        DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC("AL"),// = 2;<br><br>        /**<br>         * Weak bidirectional character type "EN" in the Unicode specification.<br>
         * @since 1.4<br>         */<br>        DIRECTIONALITY_EUROPEAN_NUMBER("EN"),// = 3;<br><br>        /**<br>         * Weak bidirectional character type "ES" in the Unicode specification.<br>         * @since 1.4<br>
         */<br>        DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR("ES"),// = 4;<br><br>        /**<br>         * Weak bidirectional character type "ET" in the Unicode specification.<br>         * @since 1.4<br>
         */<br>        DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR("ET"),// = 5;<br><br>        /**<br>         * Weak bidirectional character type "AN" in the Unicode specification.<br>         * @since 1.4<br>
         */<br>        DIRECTIONALITY_ARABIC_NUMBER("AN"),// = 6;<br><br>        /**<br>         * Weak bidirectional character type "CS" in the Unicode specification.<br>         * @since 1.4<br>         */<br>
        DIRECTIONALITY_COMMON_NUMBER_SEPARATOR("CS"),// = 7;<br><br>        /**<br>         * Weak bidirectional character type "NSM" in the Unicode specification.<br>         * @since 1.4<br>         */<br>
        DIRECTIONALITY_NONSPACING_MARK("NSM"),// = 8;<br><br>        /**<br>         * Weak bidirectional character type "BN" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_BOUNDARY_NEUTRAL("BN"),// = 9;<br>
<br>        /**<br>         * Neutral bidirectional character type "B" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_PARAGRAPH_SEPARATOR("B"),// = 10;<br>
<br>        /**<br>         * Neutral bidirectional character type "S" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_SEGMENT_SEPARATOR("S"),// = 11;<br>
<br>        /**<br>         * Neutral bidirectional character type "WS" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_WHITESPACE("WS"),// = 12;<br><br>
        /**<br>         * Neutral bidirectional character type "ON" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_OTHER_NEUTRALS("ON"),// = 13;<br><br>
        /**<br>         * Strong bidirectional character type "LRE" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING("LRE"),// = 14;<br>
<br>        /**<br>         * Strong bidirectional character type "LRO" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE("LRO"),// = 15;<br>
<br>        /**<br>         * Strong bidirectional character type "RLE" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING("RLE"),// = 16;<br>
<br>        /**<br>         * Strong bidirectional character type "RLO" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE("RLO"),// = 17;<br>
<br>        /**<br>         * Weak bidirectional character type "PDF" in the Unicode specification.<br>         * @since 1.4<br>         */<br>        DIRECTIONALITY_POP_DIRECTIONAL_FORMAT("PDF"),// = 18;<br>
        ;<br>        /**<br>         * The abbreviated name of the general category as available from the UCD.<br>         * <br>         */<br>        private String abbreviatedName;<br>        /**<br>         * The constructor requires the abbreviated name as parameter<br>
         * @param abbrName - abreviated Name for the directionality<br>         * <br>         */<br>        private Directionality(String abbrName) {<br>            this.abbreviatedName = abbrName;<br>        }<br>        /**<br>
         * This method returns the abbreviated name for the directionality represented by this instance.<br>         * @return - abbreviated name for the directionality.<br>         */<br>        public String getAbbreviatedName() {<br>
            return abbreviatedName;<br>        }<br>}<br><br>Also the following methods can be added<br><br>/**<br>  * <br>  * @ returns - The general category for the unicode code point<br>  */<br>    public static GeneralCategory getGeneralCategory(int codePoint) {<br>
        return GeneralCategory.values()[getType(codePoint)];<br>    }<br><br>/**<br>  * <br>  * @ returns - The directionality for the unicode code point<br>  */<br>    public static Directionality getDirectionalityOf(int codePoint) {<br>
        return Directionality.values()[getDirectionality(codePoint)];<br>    }<br><br><br><br></pre>