1 7 8 package com.ibm.icu.lang; 9 10 import com.ibm.icu.lang.UCharacterEnums.ECharacterCategory; 11 12 29 30 public final class UCharacterCategory implements ECharacterCategory 31 { 32 38 public static String toString(int category) 39 { 40 switch (category) { 41 case UPPERCASE_LETTER : 42 return "Letter, Uppercase"; 43 case LOWERCASE_LETTER : 44 return "Letter, Lowercase"; 45 case TITLECASE_LETTER : 46 return "Letter, Titlecase"; 47 case MODIFIER_LETTER : 48 return "Letter, Modifier"; 49 case OTHER_LETTER : 50 return "Letter, Other"; 51 case NON_SPACING_MARK : 52 return "Mark, Non-Spacing"; 53 case ENCLOSING_MARK : 54 return "Mark, Enclosing"; 55 case COMBINING_SPACING_MARK : 56 return "Mark, Spacing Combining"; 57 case DECIMAL_DIGIT_NUMBER : 58 return "Number, Decimal Digit"; 59 case LETTER_NUMBER : 60 return "Number, Letter"; 61 case OTHER_NUMBER : 62 return "Number, Other"; 63 case SPACE_SEPARATOR : 64 return "Separator, Space"; 65 case LINE_SEPARATOR : 66 return "Separator, Line"; 67 case PARAGRAPH_SEPARATOR : 68 return "Separator, Paragraph"; 69 case CONTROL : 70 return "Other, Control"; 71 case FORMAT : 72 return "Other, Format"; 73 case PRIVATE_USE : 74 return "Other, Private Use"; 75 case SURROGATE : 76 return "Other, Surrogate"; 77 case DASH_PUNCTUATION : 78 return "Punctuation, Dash"; 79 case START_PUNCTUATION : 80 return "Punctuation, Open"; 81 case END_PUNCTUATION : 82 return "Punctuation, Close"; 83 case CONNECTOR_PUNCTUATION : 84 return "Punctuation, Connector"; 85 case OTHER_PUNCTUATION : 86 return "Punctuation, Other"; 87 case MATH_SYMBOL : 88 return "Symbol, Math"; 89 case CURRENCY_SYMBOL : 90 return "Symbol, Currency"; 91 case MODIFIER_SYMBOL : 92 return "Symbol, Modifier"; 93 case OTHER_SYMBOL : 94 return "Symbol, Other"; 95 case INITIAL_PUNCTUATION : 96 return "Punctuation, Initial quote"; 97 case FINAL_PUNCTUATION : 98 return "Punctuation, Final quote"; 99 } 100 return "Unassigned"; 101 } 102 103 108 private UCharacterCategory() 109 { 110 } 111 } 113 | Popular Tags |