1# The set of ICU4J Javadoc replacements. 2 3# This is a version of the upstream UCharacter docs from ICU56 with some changes: 4# Removal of paragraphs that make no sense on Android. 5--type:android.icu.lang.UCharacter 6/** 7 * {@icuenhanced java.lang.Character}.{@icu _usage_} 8 * 9 * <p>The UCharacter class provides extensions to the {@link java.lang.Character} class. 10 * These extensions provide support for more Unicode properties. 11 * Each ICU release supports the latest version of Unicode available at that time. 12 * 13 * <p>For some time before Java 5 added support for supplementary Unicode code points, 14 * The ICU UCharacter class and many other ICU classes already supported them. 15 * Some UCharacter methods and constants were widened slightly differently than 16 * how the Character class methods and constants were widened later. 17 * In particular, {@link Character#MAX_VALUE} is still a char with the value U+FFFF, 18 * while the {@link UCharacter#MAX_VALUE} is an int with the value U+10FFFF. 19 * 20 * <p>Code points are represented in these API using ints. While it would be 21 * more convenient in Java to have a separate primitive datatype for them, 22 * ints suffice in the meantime. 23 * 24 * <p>Aside from the additions for UTF-16 support, and the updated Unicode 25 * properties, the main differences between UCharacter and Character are: 26 * <ul> 27 * <li> UCharacter is not designed to be a char wrapper and does not have 28 * APIs to which involves management of that single char.<br> 29 * These include: 30 * <ul> 31 * <li> char charValue(), 32 * <li> int compareTo(java.lang.Character, java.lang.Character), etc. 33 * </ul> 34 * <li> UCharacter does not include Character APIs that are deprecated, nor 35 * does it include the Java-specific character information, such as 36 * boolean isJavaIdentifierPart(char ch). 37 * <li> Character maps characters 'A' - 'Z' and 'a' - 'z' to the numeric 38 * values '10' - '35'. UCharacter also does this in digit and 39 * getNumericValue, to adhere to the java semantics of these 40 * methods. New methods unicodeDigit, and 41 * getUnicodeNumericValue do not treat the above code points 42 * as having numeric values. This is a semantic change from ICU4J 1.3.1. 43 * </ul> 44 * <p> 45 * In addition to Java compatibility functions, which calculate derived properties, 46 * this API provides low-level access to the Unicode Character Database. 47 * </p> 48 * <p> 49 * Unicode assigns each code point (not just assigned character) values for 50 * many properties. 51 * Most of them are simple boolean flags, or constants from a small enumerated list. 52 * For some properties, values are strings or other relatively more complex types. 53 * </p> 54 * <p> 55 * For more information see 56 * <a href="http://www.unicode/org/ucd/">"About the Unicode Character Database"</a> 57 * (http://www.unicode.org/ucd/) 58 * and the <a href="http://www.icu-project.org/userguide/properties.html">ICU 59 * User Guide chapter on Properties</a> 60 * (http://www.icu-project.org/userguide/properties.html). 61 * </p> 62 * <p> 63 * There are also functions that provide easy migration from C/POSIX functions 64 * like isblank(). Their use is generally discouraged because the C/POSIX 65 * standards do not define their semantics beyond the ASCII range, which means 66 * that different implementations exhibit very different behavior. 67 * Instead, Unicode properties should be used directly. 68 * </p> 69 * <p> 70 * There are also only a few, broad C/POSIX character classes, and they tend 71 * to be used for conflicting purposes. For example, the "isalpha()" class 72 * is sometimes used to determine word boundaries, while a more sophisticated 73 * approach would at least distinguish initial letters from continuation 74 * characters (the latter including combining marks). 75 * (In ICU, BreakIterator is the most sophisticated API for word boundaries.) 76 * Another example: There is no "istitle()" class for titlecase characters. 77 * </p> 78 * <p> 79 * ICU 3.4 and later provides API access for all twelve C/POSIX character classes. 80 * ICU implements them according to the Standard Recommendations in 81 * Annex C: Compatibility Properties of UTS #18 Unicode Regular Expressions 82 * (http://www.unicode.org/reports/tr18/#Compatibility_Properties). 83 * </p> 84 * <p> 85 * API access for C/POSIX character classes is as follows: 86 * <pre>{@code 87 * - alpha: isUAlphabetic(c) or hasBinaryProperty(c, UProperty.ALPHABETIC) 88 * - lower: isULowercase(c) or hasBinaryProperty(c, UProperty.LOWERCASE) 89 * - upper: isUUppercase(c) or hasBinaryProperty(c, UProperty.UPPERCASE) 90 * - punct: ((1<<getType(c)) & ((1<<DASH_PUNCTUATION)|(1<<START_PUNCTUATION)| 91 * (1<<END_PUNCTUATION)|(1<<CONNECTOR_PUNCTUATION)|(1<<OTHER_PUNCTUATION)| 92 * (1<<INITIAL_PUNCTUATION)|(1<<FINAL_PUNCTUATION)))!=0 93 * - digit: isDigit(c) or getType(c)==DECIMAL_DIGIT_NUMBER 94 * - xdigit: hasBinaryProperty(c, UProperty.POSIX_XDIGIT) 95 * - alnum: hasBinaryProperty(c, UProperty.POSIX_ALNUM) 96 * - space: isUWhiteSpace(c) or hasBinaryProperty(c, UProperty.WHITE_SPACE) 97 * - blank: hasBinaryProperty(c, UProperty.POSIX_BLANK) 98 * - cntrl: getType(c)==CONTROL 99 * - graph: hasBinaryProperty(c, UProperty.POSIX_GRAPH) 100 * - print: hasBinaryProperty(c, UProperty.POSIX_PRINT)}</pre> 101 * </p> 102 * <p> 103 * The C/POSIX character classes are also available in UnicodeSet patterns, 104 * using patterns like [:graph:] or \p{graph}. 105 * </p> 106 * 107 * {@icunote} There are several ICU (and Java) whitespace functions. 108 * Comparison:<ul> 109 * <li> isUWhiteSpace=UCHAR_WHITE_SPACE: Unicode White_Space property; 110 * most of general categories "Z" (separators) + most whitespace ISO controls 111 * (including no-break spaces, but excluding IS1..IS4 and ZWSP) 112 * <li> isWhitespace: Java isWhitespace; Z + whitespace ISO controls but excluding no-break spaces 113 * <li> isSpaceChar: just Z (including no-break spaces)</ul> 114 * </p> 115 * <p> 116 * This class is not subclassable. 117 * </p> 118 * @author Syn Wee Quek 119 * @stable ICU 2.1 120 * @see com.ibm.icu.lang.UCharacterEnums 121 */ 122-- 123 124# Remove @see reference to non-public class TimeUnitAmount. 125--type:android.icu.util.TimeUnit 126/** 127 * Measurement unit for time units. 128 * @see TimeUnit 129 * @author markdavis 130 * @stable ICU 4.0 131 */ 132-- 133 134# Remove references to setDefault* methods that are hidden on Android. 135--type:android.icu.util.TimeZone 136/** 137 * {@icuenhanced java.util.TimeZone}.{@icu _usage_} 138 * 139 * <p><code>TimeZone</code> represents a time zone offset, and also computes daylight 140 * savings. 141 * 142 * <p>Typically, you get a <code>TimeZone</code> using {@link #getDefault()} 143 * which creates a <code>TimeZone</code> based on the time zone where the program 144 * is running. For example, for a program running in Japan, <code>getDefault</code> 145 * creates a <code>TimeZone</code> object based on Japanese Standard Time. 146 * 147 * <p>You can also get a <code>TimeZone</code> using {@link #getTimeZone(String)} 148 * along with a time zone ID. For instance, the time zone ID for the 149 * U.S. Pacific Time zone is "America/Los_Angeles". So, you can get a 150 * U.S. Pacific Time <code>TimeZone</code> object with: 151 * 152 * <blockquote> 153 * <pre> 154 * TimeZone tz = TimeZone.getTimeZone("America/Los_Angeles"); 155 * </pre> 156 * </blockquote> 157 * You can use the {@link #getAvailableIDs()} method to iterate through 158 * all the supported time zone IDs, or getCanonicalID method to check 159 * if a time zone ID is supported or not. You can then choose a 160 * supported ID to get a <code>TimeZone</code>. 161 * If the time zone you want is not represented by one of the 162 * supported IDs, then you can create a custom time zone ID with 163 * the following syntax: 164 * 165 * <blockquote> 166 * <pre> 167 * GMT[+|-]hh[[:]mm] 168 * </pre> 169 * </blockquote> 170 * 171 * For example, you might specify GMT+14:00 as a custom 172 * time zone ID. The <code>TimeZone</code> that is returned 173 * when you specify a custom time zone ID uses the specified 174 * offset from GMT(=UTC) and does not observe daylight saving 175 * time. For example, you might specify GMT+14:00 as a custom 176 * time zone ID to create a TimeZone representing 14 hours ahead 177 * of GMT (with no daylight saving time). In addition, 178 * <code>getCanonicalID</code> can also be used to 179 * normalize a custom time zone ID. 180 * 181 * <p>For compatibility with JDK 1.1.x, some other three-letter time zone IDs 182 * (such as "PST", "CTT", "AST") are also supported. However, <strong>their 183 * use is deprecated</strong> because the same abbreviation is often used 184 * for multiple time zones (for example, "CST" could be U.S. "Central Standard 185 * Time" and "China Standard Time"), and the Java platform can then only 186 * recognize one of them. 187 * 188 * @see Calendar 189 * @see GregorianCalendar 190 * @see SimpleTimeZone 191 * @author Mark Davis, David Goldsmith, Chen-Lieh Huang, Alan Liu 192 * @stable ICU 2.0 193 */ 194-- 195 196# Remove the reference to ULocale.setDefault() and remove system properties information. 197--method:android.icu.util.ULocale#getDefault() 198/** 199 * Returns the current default ULocale. 200 * <p> 201 * The default ULocale is synchronized to the default Java Locale. This method checks 202 * the current default Java Locale and returns an equivalent ULocale. 203 * 204 * @return the default ULocale. 205 * @stable ICU 2.8 206 */ 207-- 208 209# Removal of sentence containing link to class that is not exposed in Android API 210--type:android.icu.text.UnicodeFilter 211/** 212 * <code>UnicodeFilter</code> defines a protocol for selecting a 213 * subset of the full range (U+0000 to U+FFFF) of Unicode characters. 214 * @stable ICU 2.0 215 */ 216-- 217