jaroslav@68
|
1 |
/*
|
jaroslav@68
|
2 |
* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
|
jaroslav@68
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
jaroslav@68
|
4 |
*
|
jaroslav@68
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
jaroslav@68
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
jaroslav@68
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
jaroslav@68
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
jaroslav@68
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
jaroslav@68
|
10 |
*
|
jaroslav@68
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
jaroslav@68
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
jaroslav@68
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
jaroslav@68
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
jaroslav@68
|
15 |
* accompanied this code).
|
jaroslav@68
|
16 |
*
|
jaroslav@68
|
17 |
* You should have received a copy of the GNU General Public License version
|
jaroslav@68
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
jaroslav@68
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
jaroslav@68
|
20 |
*
|
jaroslav@68
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
jaroslav@68
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
jaroslav@68
|
23 |
* questions.
|
jaroslav@68
|
24 |
*/
|
jaroslav@68
|
25 |
|
jaroslav@68
|
26 |
package java.lang;
|
jaroslav@68
|
27 |
|
jaroslav@68
|
28 |
import java.util.Arrays;
|
jaroslav@68
|
29 |
import java.util.Map;
|
jaroslav@68
|
30 |
import java.util.HashMap;
|
jaroslav@68
|
31 |
import java.util.Locale;
|
jaroslav@68
|
32 |
|
jaroslav@68
|
33 |
/**
|
jaroslav@68
|
34 |
* The {@code Character} class wraps a value of the primitive
|
jaroslav@68
|
35 |
* type {@code char} in an object. An object of type
|
jaroslav@68
|
36 |
* {@code Character} contains a single field whose type is
|
jaroslav@68
|
37 |
* {@code char}.
|
jaroslav@68
|
38 |
* <p>
|
jaroslav@68
|
39 |
* In addition, this class provides several methods for determining
|
jaroslav@68
|
40 |
* a character's category (lowercase letter, digit, etc.) and for converting
|
jaroslav@68
|
41 |
* characters from uppercase to lowercase and vice versa.
|
jaroslav@68
|
42 |
* <p>
|
jaroslav@68
|
43 |
* Character information is based on the Unicode Standard, version 6.0.0.
|
jaroslav@68
|
44 |
* <p>
|
jaroslav@68
|
45 |
* The methods and data of class {@code Character} are defined by
|
jaroslav@68
|
46 |
* the information in the <i>UnicodeData</i> file that is part of the
|
jaroslav@68
|
47 |
* Unicode Character Database maintained by the Unicode
|
jaroslav@68
|
48 |
* Consortium. This file specifies various properties including name
|
jaroslav@68
|
49 |
* and general category for every defined Unicode code point or
|
jaroslav@68
|
50 |
* character range.
|
jaroslav@68
|
51 |
* <p>
|
jaroslav@68
|
52 |
* The file and its description are available from the Unicode Consortium at:
|
jaroslav@68
|
53 |
* <ul>
|
jaroslav@68
|
54 |
* <li><a href="http://www.unicode.org">http://www.unicode.org</a>
|
jaroslav@68
|
55 |
* </ul>
|
jaroslav@68
|
56 |
*
|
jaroslav@68
|
57 |
* <h4><a name="unicode">Unicode Character Representations</a></h4>
|
jaroslav@68
|
58 |
*
|
jaroslav@68
|
59 |
* <p>The {@code char} data type (and therefore the value that a
|
jaroslav@68
|
60 |
* {@code Character} object encapsulates) are based on the
|
jaroslav@68
|
61 |
* original Unicode specification, which defined characters as
|
jaroslav@68
|
62 |
* fixed-width 16-bit entities. The Unicode Standard has since been
|
jaroslav@68
|
63 |
* changed to allow for characters whose representation requires more
|
jaroslav@68
|
64 |
* than 16 bits. The range of legal <em>code point</em>s is now
|
jaroslav@68
|
65 |
* U+0000 to U+10FFFF, known as <em>Unicode scalar value</em>.
|
jaroslav@68
|
66 |
* (Refer to the <a
|
jaroslav@68
|
67 |
* href="http://www.unicode.org/reports/tr27/#notation"><i>
|
jaroslav@68
|
68 |
* definition</i></a> of the U+<i>n</i> notation in the Unicode
|
jaroslav@68
|
69 |
* Standard.)
|
jaroslav@68
|
70 |
*
|
jaroslav@68
|
71 |
* <p><a name="BMP">The set of characters from U+0000 to U+FFFF is
|
jaroslav@68
|
72 |
* sometimes referred to as the <em>Basic Multilingual Plane (BMP)</em>.
|
jaroslav@68
|
73 |
* <a name="supplementary">Characters</a> whose code points are greater
|
jaroslav@68
|
74 |
* than U+FFFF are called <em>supplementary character</em>s. The Java
|
jaroslav@68
|
75 |
* platform uses the UTF-16 representation in {@code char} arrays and
|
jaroslav@68
|
76 |
* in the {@code String} and {@code StringBuffer} classes. In
|
jaroslav@68
|
77 |
* this representation, supplementary characters are represented as a pair
|
jaroslav@68
|
78 |
* of {@code char} values, the first from the <em>high-surrogates</em>
|
jaroslav@68
|
79 |
* range, (\uD800-\uDBFF), the second from the
|
jaroslav@68
|
80 |
* <em>low-surrogates</em> range (\uDC00-\uDFFF).
|
jaroslav@68
|
81 |
*
|
jaroslav@68
|
82 |
* <p>A {@code char} value, therefore, represents Basic
|
jaroslav@68
|
83 |
* Multilingual Plane (BMP) code points, including the surrogate
|
jaroslav@68
|
84 |
* code points, or code units of the UTF-16 encoding. An
|
jaroslav@68
|
85 |
* {@code int} value represents all Unicode code points,
|
jaroslav@68
|
86 |
* including supplementary code points. The lower (least significant)
|
jaroslav@68
|
87 |
* 21 bits of {@code int} are used to represent Unicode code
|
jaroslav@68
|
88 |
* points and the upper (most significant) 11 bits must be zero.
|
jaroslav@68
|
89 |
* Unless otherwise specified, the behavior with respect to
|
jaroslav@68
|
90 |
* supplementary characters and surrogate {@code char} values is
|
jaroslav@68
|
91 |
* as follows:
|
jaroslav@68
|
92 |
*
|
jaroslav@68
|
93 |
* <ul>
|
jaroslav@68
|
94 |
* <li>The methods that only accept a {@code char} value cannot support
|
jaroslav@68
|
95 |
* supplementary characters. They treat {@code char} values from the
|
jaroslav@68
|
96 |
* surrogate ranges as undefined characters. For example,
|
jaroslav@68
|
97 |
* {@code Character.isLetter('\u005CuD840')} returns {@code false}, even though
|
jaroslav@68
|
98 |
* this specific value if followed by any low-surrogate value in a string
|
jaroslav@68
|
99 |
* would represent a letter.
|
jaroslav@68
|
100 |
*
|
jaroslav@68
|
101 |
* <li>The methods that accept an {@code int} value support all
|
jaroslav@68
|
102 |
* Unicode characters, including supplementary characters. For
|
jaroslav@68
|
103 |
* example, {@code Character.isLetter(0x2F81A)} returns
|
jaroslav@68
|
104 |
* {@code true} because the code point value represents a letter
|
jaroslav@68
|
105 |
* (a CJK ideograph).
|
jaroslav@68
|
106 |
* </ul>
|
jaroslav@68
|
107 |
*
|
jaroslav@68
|
108 |
* <p>In the Java SE API documentation, <em>Unicode code point</em> is
|
jaroslav@68
|
109 |
* used for character values in the range between U+0000 and U+10FFFF,
|
jaroslav@68
|
110 |
* and <em>Unicode code unit</em> is used for 16-bit
|
jaroslav@68
|
111 |
* {@code char} values that are code units of the <em>UTF-16</em>
|
jaroslav@68
|
112 |
* encoding. For more information on Unicode terminology, refer to the
|
jaroslav@68
|
113 |
* <a href="http://www.unicode.org/glossary/">Unicode Glossary</a>.
|
jaroslav@68
|
114 |
*
|
jaroslav@68
|
115 |
* @author Lee Boynton
|
jaroslav@68
|
116 |
* @author Guy Steele
|
jaroslav@68
|
117 |
* @author Akira Tanaka
|
jaroslav@68
|
118 |
* @author Martin Buchholz
|
jaroslav@68
|
119 |
* @author Ulf Zibis
|
jaroslav@68
|
120 |
* @since 1.0
|
jaroslav@68
|
121 |
*/
|
jaroslav@68
|
122 |
public final
|
jaroslav@68
|
123 |
class Character implements java.io.Serializable, Comparable<Character> {
|
jaroslav@68
|
124 |
/**
|
jaroslav@68
|
125 |
* The minimum radix available for conversion to and from strings.
|
jaroslav@68
|
126 |
* The constant value of this field is the smallest value permitted
|
jaroslav@68
|
127 |
* for the radix argument in radix-conversion methods such as the
|
jaroslav@68
|
128 |
* {@code digit} method, the {@code forDigit} method, and the
|
jaroslav@68
|
129 |
* {@code toString} method of class {@code Integer}.
|
jaroslav@68
|
130 |
*
|
jaroslav@68
|
131 |
* @see Character#digit(char, int)
|
jaroslav@68
|
132 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
133 |
* @see Integer#toString(int, int)
|
jaroslav@68
|
134 |
* @see Integer#valueOf(String)
|
jaroslav@68
|
135 |
*/
|
jaroslav@68
|
136 |
public static final int MIN_RADIX = 2;
|
jaroslav@68
|
137 |
|
jaroslav@68
|
138 |
/**
|
jaroslav@68
|
139 |
* The maximum radix available for conversion to and from strings.
|
jaroslav@68
|
140 |
* The constant value of this field is the largest value permitted
|
jaroslav@68
|
141 |
* for the radix argument in radix-conversion methods such as the
|
jaroslav@68
|
142 |
* {@code digit} method, the {@code forDigit} method, and the
|
jaroslav@68
|
143 |
* {@code toString} method of class {@code Integer}.
|
jaroslav@68
|
144 |
*
|
jaroslav@68
|
145 |
* @see Character#digit(char, int)
|
jaroslav@68
|
146 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
147 |
* @see Integer#toString(int, int)
|
jaroslav@68
|
148 |
* @see Integer#valueOf(String)
|
jaroslav@68
|
149 |
*/
|
jaroslav@68
|
150 |
public static final int MAX_RADIX = 36;
|
jaroslav@68
|
151 |
|
jaroslav@68
|
152 |
/**
|
jaroslav@68
|
153 |
* The constant value of this field is the smallest value of type
|
jaroslav@68
|
154 |
* {@code char}, {@code '\u005Cu0000'}.
|
jaroslav@68
|
155 |
*
|
jaroslav@68
|
156 |
* @since 1.0.2
|
jaroslav@68
|
157 |
*/
|
jaroslav@68
|
158 |
public static final char MIN_VALUE = '\u0000';
|
jaroslav@68
|
159 |
|
jaroslav@68
|
160 |
/**
|
jaroslav@68
|
161 |
* The constant value of this field is the largest value of type
|
jaroslav@68
|
162 |
* {@code char}, {@code '\u005CuFFFF'}.
|
jaroslav@68
|
163 |
*
|
jaroslav@68
|
164 |
* @since 1.0.2
|
jaroslav@68
|
165 |
*/
|
jaroslav@68
|
166 |
public static final char MAX_VALUE = '\uFFFF';
|
jaroslav@68
|
167 |
|
jaroslav@68
|
168 |
/**
|
jaroslav@68
|
169 |
* The {@code Class} instance representing the primitive type
|
jaroslav@68
|
170 |
* {@code char}.
|
jaroslav@68
|
171 |
*
|
jaroslav@68
|
172 |
* @since 1.1
|
jaroslav@68
|
173 |
*/
|
jaroslav@68
|
174 |
@SuppressWarnings("unchecked")
|
jaroslav@68
|
175 |
public static final Class<Character> TYPE = Class.getPrimitiveClass("char");
|
jaroslav@68
|
176 |
|
jaroslav@68
|
177 |
/*
|
jaroslav@68
|
178 |
* Normative general types
|
jaroslav@68
|
179 |
*/
|
jaroslav@68
|
180 |
|
jaroslav@68
|
181 |
/*
|
jaroslav@68
|
182 |
* General character types
|
jaroslav@68
|
183 |
*/
|
jaroslav@68
|
184 |
|
jaroslav@68
|
185 |
/**
|
jaroslav@68
|
186 |
* General category "Cn" in the Unicode specification.
|
jaroslav@68
|
187 |
* @since 1.1
|
jaroslav@68
|
188 |
*/
|
jaroslav@68
|
189 |
public static final byte UNASSIGNED = 0;
|
jaroslav@68
|
190 |
|
jaroslav@68
|
191 |
/**
|
jaroslav@68
|
192 |
* General category "Lu" in the Unicode specification.
|
jaroslav@68
|
193 |
* @since 1.1
|
jaroslav@68
|
194 |
*/
|
jaroslav@68
|
195 |
public static final byte UPPERCASE_LETTER = 1;
|
jaroslav@68
|
196 |
|
jaroslav@68
|
197 |
/**
|
jaroslav@68
|
198 |
* General category "Ll" in the Unicode specification.
|
jaroslav@68
|
199 |
* @since 1.1
|
jaroslav@68
|
200 |
*/
|
jaroslav@68
|
201 |
public static final byte LOWERCASE_LETTER = 2;
|
jaroslav@68
|
202 |
|
jaroslav@68
|
203 |
/**
|
jaroslav@68
|
204 |
* General category "Lt" in the Unicode specification.
|
jaroslav@68
|
205 |
* @since 1.1
|
jaroslav@68
|
206 |
*/
|
jaroslav@68
|
207 |
public static final byte TITLECASE_LETTER = 3;
|
jaroslav@68
|
208 |
|
jaroslav@68
|
209 |
/**
|
jaroslav@68
|
210 |
* General category "Lm" in the Unicode specification.
|
jaroslav@68
|
211 |
* @since 1.1
|
jaroslav@68
|
212 |
*/
|
jaroslav@68
|
213 |
public static final byte MODIFIER_LETTER = 4;
|
jaroslav@68
|
214 |
|
jaroslav@68
|
215 |
/**
|
jaroslav@68
|
216 |
* General category "Lo" in the Unicode specification.
|
jaroslav@68
|
217 |
* @since 1.1
|
jaroslav@68
|
218 |
*/
|
jaroslav@68
|
219 |
public static final byte OTHER_LETTER = 5;
|
jaroslav@68
|
220 |
|
jaroslav@68
|
221 |
/**
|
jaroslav@68
|
222 |
* General category "Mn" in the Unicode specification.
|
jaroslav@68
|
223 |
* @since 1.1
|
jaroslav@68
|
224 |
*/
|
jaroslav@68
|
225 |
public static final byte NON_SPACING_MARK = 6;
|
jaroslav@68
|
226 |
|
jaroslav@68
|
227 |
/**
|
jaroslav@68
|
228 |
* General category "Me" in the Unicode specification.
|
jaroslav@68
|
229 |
* @since 1.1
|
jaroslav@68
|
230 |
*/
|
jaroslav@68
|
231 |
public static final byte ENCLOSING_MARK = 7;
|
jaroslav@68
|
232 |
|
jaroslav@68
|
233 |
/**
|
jaroslav@68
|
234 |
* General category "Mc" in the Unicode specification.
|
jaroslav@68
|
235 |
* @since 1.1
|
jaroslav@68
|
236 |
*/
|
jaroslav@68
|
237 |
public static final byte COMBINING_SPACING_MARK = 8;
|
jaroslav@68
|
238 |
|
jaroslav@68
|
239 |
/**
|
jaroslav@68
|
240 |
* General category "Nd" in the Unicode specification.
|
jaroslav@68
|
241 |
* @since 1.1
|
jaroslav@68
|
242 |
*/
|
jaroslav@68
|
243 |
public static final byte DECIMAL_DIGIT_NUMBER = 9;
|
jaroslav@68
|
244 |
|
jaroslav@68
|
245 |
/**
|
jaroslav@68
|
246 |
* General category "Nl" in the Unicode specification.
|
jaroslav@68
|
247 |
* @since 1.1
|
jaroslav@68
|
248 |
*/
|
jaroslav@68
|
249 |
public static final byte LETTER_NUMBER = 10;
|
jaroslav@68
|
250 |
|
jaroslav@68
|
251 |
/**
|
jaroslav@68
|
252 |
* General category "No" in the Unicode specification.
|
jaroslav@68
|
253 |
* @since 1.1
|
jaroslav@68
|
254 |
*/
|
jaroslav@68
|
255 |
public static final byte OTHER_NUMBER = 11;
|
jaroslav@68
|
256 |
|
jaroslav@68
|
257 |
/**
|
jaroslav@68
|
258 |
* General category "Zs" in the Unicode specification.
|
jaroslav@68
|
259 |
* @since 1.1
|
jaroslav@68
|
260 |
*/
|
jaroslav@68
|
261 |
public static final byte SPACE_SEPARATOR = 12;
|
jaroslav@68
|
262 |
|
jaroslav@68
|
263 |
/**
|
jaroslav@68
|
264 |
* General category "Zl" in the Unicode specification.
|
jaroslav@68
|
265 |
* @since 1.1
|
jaroslav@68
|
266 |
*/
|
jaroslav@68
|
267 |
public static final byte LINE_SEPARATOR = 13;
|
jaroslav@68
|
268 |
|
jaroslav@68
|
269 |
/**
|
jaroslav@68
|
270 |
* General category "Zp" in the Unicode specification.
|
jaroslav@68
|
271 |
* @since 1.1
|
jaroslav@68
|
272 |
*/
|
jaroslav@68
|
273 |
public static final byte PARAGRAPH_SEPARATOR = 14;
|
jaroslav@68
|
274 |
|
jaroslav@68
|
275 |
/**
|
jaroslav@68
|
276 |
* General category "Cc" in the Unicode specification.
|
jaroslav@68
|
277 |
* @since 1.1
|
jaroslav@68
|
278 |
*/
|
jaroslav@68
|
279 |
public static final byte CONTROL = 15;
|
jaroslav@68
|
280 |
|
jaroslav@68
|
281 |
/**
|
jaroslav@68
|
282 |
* General category "Cf" in the Unicode specification.
|
jaroslav@68
|
283 |
* @since 1.1
|
jaroslav@68
|
284 |
*/
|
jaroslav@68
|
285 |
public static final byte FORMAT = 16;
|
jaroslav@68
|
286 |
|
jaroslav@68
|
287 |
/**
|
jaroslav@68
|
288 |
* General category "Co" in the Unicode specification.
|
jaroslav@68
|
289 |
* @since 1.1
|
jaroslav@68
|
290 |
*/
|
jaroslav@68
|
291 |
public static final byte PRIVATE_USE = 18;
|
jaroslav@68
|
292 |
|
jaroslav@68
|
293 |
/**
|
jaroslav@68
|
294 |
* General category "Cs" in the Unicode specification.
|
jaroslav@68
|
295 |
* @since 1.1
|
jaroslav@68
|
296 |
*/
|
jaroslav@68
|
297 |
public static final byte SURROGATE = 19;
|
jaroslav@68
|
298 |
|
jaroslav@68
|
299 |
/**
|
jaroslav@68
|
300 |
* General category "Pd" in the Unicode specification.
|
jaroslav@68
|
301 |
* @since 1.1
|
jaroslav@68
|
302 |
*/
|
jaroslav@68
|
303 |
public static final byte DASH_PUNCTUATION = 20;
|
jaroslav@68
|
304 |
|
jaroslav@68
|
305 |
/**
|
jaroslav@68
|
306 |
* General category "Ps" in the Unicode specification.
|
jaroslav@68
|
307 |
* @since 1.1
|
jaroslav@68
|
308 |
*/
|
jaroslav@68
|
309 |
public static final byte START_PUNCTUATION = 21;
|
jaroslav@68
|
310 |
|
jaroslav@68
|
311 |
/**
|
jaroslav@68
|
312 |
* General category "Pe" in the Unicode specification.
|
jaroslav@68
|
313 |
* @since 1.1
|
jaroslav@68
|
314 |
*/
|
jaroslav@68
|
315 |
public static final byte END_PUNCTUATION = 22;
|
jaroslav@68
|
316 |
|
jaroslav@68
|
317 |
/**
|
jaroslav@68
|
318 |
* General category "Pc" in the Unicode specification.
|
jaroslav@68
|
319 |
* @since 1.1
|
jaroslav@68
|
320 |
*/
|
jaroslav@68
|
321 |
public static final byte CONNECTOR_PUNCTUATION = 23;
|
jaroslav@68
|
322 |
|
jaroslav@68
|
323 |
/**
|
jaroslav@68
|
324 |
* General category "Po" in the Unicode specification.
|
jaroslav@68
|
325 |
* @since 1.1
|
jaroslav@68
|
326 |
*/
|
jaroslav@68
|
327 |
public static final byte OTHER_PUNCTUATION = 24;
|
jaroslav@68
|
328 |
|
jaroslav@68
|
329 |
/**
|
jaroslav@68
|
330 |
* General category "Sm" in the Unicode specification.
|
jaroslav@68
|
331 |
* @since 1.1
|
jaroslav@68
|
332 |
*/
|
jaroslav@68
|
333 |
public static final byte MATH_SYMBOL = 25;
|
jaroslav@68
|
334 |
|
jaroslav@68
|
335 |
/**
|
jaroslav@68
|
336 |
* General category "Sc" in the Unicode specification.
|
jaroslav@68
|
337 |
* @since 1.1
|
jaroslav@68
|
338 |
*/
|
jaroslav@68
|
339 |
public static final byte CURRENCY_SYMBOL = 26;
|
jaroslav@68
|
340 |
|
jaroslav@68
|
341 |
/**
|
jaroslav@68
|
342 |
* General category "Sk" in the Unicode specification.
|
jaroslav@68
|
343 |
* @since 1.1
|
jaroslav@68
|
344 |
*/
|
jaroslav@68
|
345 |
public static final byte MODIFIER_SYMBOL = 27;
|
jaroslav@68
|
346 |
|
jaroslav@68
|
347 |
/**
|
jaroslav@68
|
348 |
* General category "So" in the Unicode specification.
|
jaroslav@68
|
349 |
* @since 1.1
|
jaroslav@68
|
350 |
*/
|
jaroslav@68
|
351 |
public static final byte OTHER_SYMBOL = 28;
|
jaroslav@68
|
352 |
|
jaroslav@68
|
353 |
/**
|
jaroslav@68
|
354 |
* General category "Pi" in the Unicode specification.
|
jaroslav@68
|
355 |
* @since 1.4
|
jaroslav@68
|
356 |
*/
|
jaroslav@68
|
357 |
public static final byte INITIAL_QUOTE_PUNCTUATION = 29;
|
jaroslav@68
|
358 |
|
jaroslav@68
|
359 |
/**
|
jaroslav@68
|
360 |
* General category "Pf" in the Unicode specification.
|
jaroslav@68
|
361 |
* @since 1.4
|
jaroslav@68
|
362 |
*/
|
jaroslav@68
|
363 |
public static final byte FINAL_QUOTE_PUNCTUATION = 30;
|
jaroslav@68
|
364 |
|
jaroslav@68
|
365 |
/**
|
jaroslav@68
|
366 |
* Error flag. Use int (code point) to avoid confusion with U+FFFF.
|
jaroslav@68
|
367 |
*/
|
jaroslav@68
|
368 |
static final int ERROR = 0xFFFFFFFF;
|
jaroslav@68
|
369 |
|
jaroslav@68
|
370 |
|
jaroslav@68
|
371 |
/**
|
jaroslav@68
|
372 |
* Undefined bidirectional character type. Undefined {@code char}
|
jaroslav@68
|
373 |
* values have undefined directionality in the Unicode specification.
|
jaroslav@68
|
374 |
* @since 1.4
|
jaroslav@68
|
375 |
*/
|
jaroslav@68
|
376 |
public static final byte DIRECTIONALITY_UNDEFINED = -1;
|
jaroslav@68
|
377 |
|
jaroslav@68
|
378 |
/**
|
jaroslav@68
|
379 |
* Strong bidirectional character type "L" in the Unicode specification.
|
jaroslav@68
|
380 |
* @since 1.4
|
jaroslav@68
|
381 |
*/
|
jaroslav@68
|
382 |
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0;
|
jaroslav@68
|
383 |
|
jaroslav@68
|
384 |
/**
|
jaroslav@68
|
385 |
* Strong bidirectional character type "R" in the Unicode specification.
|
jaroslav@68
|
386 |
* @since 1.4
|
jaroslav@68
|
387 |
*/
|
jaroslav@68
|
388 |
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1;
|
jaroslav@68
|
389 |
|
jaroslav@68
|
390 |
/**
|
jaroslav@68
|
391 |
* Strong bidirectional character type "AL" in the Unicode specification.
|
jaroslav@68
|
392 |
* @since 1.4
|
jaroslav@68
|
393 |
*/
|
jaroslav@68
|
394 |
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2;
|
jaroslav@68
|
395 |
|
jaroslav@68
|
396 |
/**
|
jaroslav@68
|
397 |
* Weak bidirectional character type "EN" in the Unicode specification.
|
jaroslav@68
|
398 |
* @since 1.4
|
jaroslav@68
|
399 |
*/
|
jaroslav@68
|
400 |
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 3;
|
jaroslav@68
|
401 |
|
jaroslav@68
|
402 |
/**
|
jaroslav@68
|
403 |
* Weak bidirectional character type "ES" in the Unicode specification.
|
jaroslav@68
|
404 |
* @since 1.4
|
jaroslav@68
|
405 |
*/
|
jaroslav@68
|
406 |
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4;
|
jaroslav@68
|
407 |
|
jaroslav@68
|
408 |
/**
|
jaroslav@68
|
409 |
* Weak bidirectional character type "ET" in the Unicode specification.
|
jaroslav@68
|
410 |
* @since 1.4
|
jaroslav@68
|
411 |
*/
|
jaroslav@68
|
412 |
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5;
|
jaroslav@68
|
413 |
|
jaroslav@68
|
414 |
/**
|
jaroslav@68
|
415 |
* Weak bidirectional character type "AN" in the Unicode specification.
|
jaroslav@68
|
416 |
* @since 1.4
|
jaroslav@68
|
417 |
*/
|
jaroslav@68
|
418 |
public static final byte DIRECTIONALITY_ARABIC_NUMBER = 6;
|
jaroslav@68
|
419 |
|
jaroslav@68
|
420 |
/**
|
jaroslav@68
|
421 |
* Weak bidirectional character type "CS" in the Unicode specification.
|
jaroslav@68
|
422 |
* @since 1.4
|
jaroslav@68
|
423 |
*/
|
jaroslav@68
|
424 |
public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7;
|
jaroslav@68
|
425 |
|
jaroslav@68
|
426 |
/**
|
jaroslav@68
|
427 |
* Weak bidirectional character type "NSM" in the Unicode specification.
|
jaroslav@68
|
428 |
* @since 1.4
|
jaroslav@68
|
429 |
*/
|
jaroslav@68
|
430 |
public static final byte DIRECTIONALITY_NONSPACING_MARK = 8;
|
jaroslav@68
|
431 |
|
jaroslav@68
|
432 |
/**
|
jaroslav@68
|
433 |
* Weak bidirectional character type "BN" in the Unicode specification.
|
jaroslav@68
|
434 |
* @since 1.4
|
jaroslav@68
|
435 |
*/
|
jaroslav@68
|
436 |
public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9;
|
jaroslav@68
|
437 |
|
jaroslav@68
|
438 |
/**
|
jaroslav@68
|
439 |
* Neutral bidirectional character type "B" in the Unicode specification.
|
jaroslav@68
|
440 |
* @since 1.4
|
jaroslav@68
|
441 |
*/
|
jaroslav@68
|
442 |
public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10;
|
jaroslav@68
|
443 |
|
jaroslav@68
|
444 |
/**
|
jaroslav@68
|
445 |
* Neutral bidirectional character type "S" in the Unicode specification.
|
jaroslav@68
|
446 |
* @since 1.4
|
jaroslav@68
|
447 |
*/
|
jaroslav@68
|
448 |
public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 11;
|
jaroslav@68
|
449 |
|
jaroslav@68
|
450 |
/**
|
jaroslav@68
|
451 |
* Neutral bidirectional character type "WS" in the Unicode specification.
|
jaroslav@68
|
452 |
* @since 1.4
|
jaroslav@68
|
453 |
*/
|
jaroslav@68
|
454 |
public static final byte DIRECTIONALITY_WHITESPACE = 12;
|
jaroslav@68
|
455 |
|
jaroslav@68
|
456 |
/**
|
jaroslav@68
|
457 |
* Neutral bidirectional character type "ON" in the Unicode specification.
|
jaroslav@68
|
458 |
* @since 1.4
|
jaroslav@68
|
459 |
*/
|
jaroslav@68
|
460 |
public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 13;
|
jaroslav@68
|
461 |
|
jaroslav@68
|
462 |
/**
|
jaroslav@68
|
463 |
* Strong bidirectional character type "LRE" in the Unicode specification.
|
jaroslav@68
|
464 |
* @since 1.4
|
jaroslav@68
|
465 |
*/
|
jaroslav@68
|
466 |
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14;
|
jaroslav@68
|
467 |
|
jaroslav@68
|
468 |
/**
|
jaroslav@68
|
469 |
* Strong bidirectional character type "LRO" in the Unicode specification.
|
jaroslav@68
|
470 |
* @since 1.4
|
jaroslav@68
|
471 |
*/
|
jaroslav@68
|
472 |
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15;
|
jaroslav@68
|
473 |
|
jaroslav@68
|
474 |
/**
|
jaroslav@68
|
475 |
* Strong bidirectional character type "RLE" in the Unicode specification.
|
jaroslav@68
|
476 |
* @since 1.4
|
jaroslav@68
|
477 |
*/
|
jaroslav@68
|
478 |
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16;
|
jaroslav@68
|
479 |
|
jaroslav@68
|
480 |
/**
|
jaroslav@68
|
481 |
* Strong bidirectional character type "RLO" in the Unicode specification.
|
jaroslav@68
|
482 |
* @since 1.4
|
jaroslav@68
|
483 |
*/
|
jaroslav@68
|
484 |
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17;
|
jaroslav@68
|
485 |
|
jaroslav@68
|
486 |
/**
|
jaroslav@68
|
487 |
* Weak bidirectional character type "PDF" in the Unicode specification.
|
jaroslav@68
|
488 |
* @since 1.4
|
jaroslav@68
|
489 |
*/
|
jaroslav@68
|
490 |
public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18;
|
jaroslav@68
|
491 |
|
jaroslav@68
|
492 |
/**
|
jaroslav@68
|
493 |
* The minimum value of a
|
jaroslav@68
|
494 |
* <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit">
|
jaroslav@68
|
495 |
* Unicode high-surrogate code unit</a>
|
jaroslav@68
|
496 |
* in the UTF-16 encoding, constant {@code '\u005CuD800'}.
|
jaroslav@68
|
497 |
* A high-surrogate is also known as a <i>leading-surrogate</i>.
|
jaroslav@68
|
498 |
*
|
jaroslav@68
|
499 |
* @since 1.5
|
jaroslav@68
|
500 |
*/
|
jaroslav@68
|
501 |
public static final char MIN_HIGH_SURROGATE = '\uD800';
|
jaroslav@68
|
502 |
|
jaroslav@68
|
503 |
/**
|
jaroslav@68
|
504 |
* The maximum value of a
|
jaroslav@68
|
505 |
* <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit">
|
jaroslav@68
|
506 |
* Unicode high-surrogate code unit</a>
|
jaroslav@68
|
507 |
* in the UTF-16 encoding, constant {@code '\u005CuDBFF'}.
|
jaroslav@68
|
508 |
* A high-surrogate is also known as a <i>leading-surrogate</i>.
|
jaroslav@68
|
509 |
*
|
jaroslav@68
|
510 |
* @since 1.5
|
jaroslav@68
|
511 |
*/
|
jaroslav@68
|
512 |
public static final char MAX_HIGH_SURROGATE = '\uDBFF';
|
jaroslav@68
|
513 |
|
jaroslav@68
|
514 |
/**
|
jaroslav@68
|
515 |
* The minimum value of a
|
jaroslav@68
|
516 |
* <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit">
|
jaroslav@68
|
517 |
* Unicode low-surrogate code unit</a>
|
jaroslav@68
|
518 |
* in the UTF-16 encoding, constant {@code '\u005CuDC00'}.
|
jaroslav@68
|
519 |
* A low-surrogate is also known as a <i>trailing-surrogate</i>.
|
jaroslav@68
|
520 |
*
|
jaroslav@68
|
521 |
* @since 1.5
|
jaroslav@68
|
522 |
*/
|
jaroslav@68
|
523 |
public static final char MIN_LOW_SURROGATE = '\uDC00';
|
jaroslav@68
|
524 |
|
jaroslav@68
|
525 |
/**
|
jaroslav@68
|
526 |
* The maximum value of a
|
jaroslav@68
|
527 |
* <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit">
|
jaroslav@68
|
528 |
* Unicode low-surrogate code unit</a>
|
jaroslav@68
|
529 |
* in the UTF-16 encoding, constant {@code '\u005CuDFFF'}.
|
jaroslav@68
|
530 |
* A low-surrogate is also known as a <i>trailing-surrogate</i>.
|
jaroslav@68
|
531 |
*
|
jaroslav@68
|
532 |
* @since 1.5
|
jaroslav@68
|
533 |
*/
|
jaroslav@68
|
534 |
public static final char MAX_LOW_SURROGATE = '\uDFFF';
|
jaroslav@68
|
535 |
|
jaroslav@68
|
536 |
/**
|
jaroslav@68
|
537 |
* The minimum value of a Unicode surrogate code unit in the
|
jaroslav@68
|
538 |
* UTF-16 encoding, constant {@code '\u005CuD800'}.
|
jaroslav@68
|
539 |
*
|
jaroslav@68
|
540 |
* @since 1.5
|
jaroslav@68
|
541 |
*/
|
jaroslav@68
|
542 |
public static final char MIN_SURROGATE = MIN_HIGH_SURROGATE;
|
jaroslav@68
|
543 |
|
jaroslav@68
|
544 |
/**
|
jaroslav@68
|
545 |
* The maximum value of a Unicode surrogate code unit in the
|
jaroslav@68
|
546 |
* UTF-16 encoding, constant {@code '\u005CuDFFF'}.
|
jaroslav@68
|
547 |
*
|
jaroslav@68
|
548 |
* @since 1.5
|
jaroslav@68
|
549 |
*/
|
jaroslav@68
|
550 |
public static final char MAX_SURROGATE = MAX_LOW_SURROGATE;
|
jaroslav@68
|
551 |
|
jaroslav@68
|
552 |
/**
|
jaroslav@68
|
553 |
* The minimum value of a
|
jaroslav@68
|
554 |
* <a href="http://www.unicode.org/glossary/#supplementary_code_point">
|
jaroslav@68
|
555 |
* Unicode supplementary code point</a>, constant {@code U+10000}.
|
jaroslav@68
|
556 |
*
|
jaroslav@68
|
557 |
* @since 1.5
|
jaroslav@68
|
558 |
*/
|
jaroslav@68
|
559 |
public static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x010000;
|
jaroslav@68
|
560 |
|
jaroslav@68
|
561 |
/**
|
jaroslav@68
|
562 |
* The minimum value of a
|
jaroslav@68
|
563 |
* <a href="http://www.unicode.org/glossary/#code_point">
|
jaroslav@68
|
564 |
* Unicode code point</a>, constant {@code U+0000}.
|
jaroslav@68
|
565 |
*
|
jaroslav@68
|
566 |
* @since 1.5
|
jaroslav@68
|
567 |
*/
|
jaroslav@68
|
568 |
public static final int MIN_CODE_POINT = 0x000000;
|
jaroslav@68
|
569 |
|
jaroslav@68
|
570 |
/**
|
jaroslav@68
|
571 |
* The maximum value of a
|
jaroslav@68
|
572 |
* <a href="http://www.unicode.org/glossary/#code_point">
|
jaroslav@68
|
573 |
* Unicode code point</a>, constant {@code U+10FFFF}.
|
jaroslav@68
|
574 |
*
|
jaroslav@68
|
575 |
* @since 1.5
|
jaroslav@68
|
576 |
*/
|
jaroslav@68
|
577 |
public static final int MAX_CODE_POINT = 0X10FFFF;
|
jaroslav@68
|
578 |
|
jaroslav@68
|
579 |
|
jaroslav@68
|
580 |
/**
|
jaroslav@68
|
581 |
* Instances of this class represent particular subsets of the Unicode
|
jaroslav@68
|
582 |
* character set. The only family of subsets defined in the
|
jaroslav@68
|
583 |
* {@code Character} class is {@link Character.UnicodeBlock}.
|
jaroslav@68
|
584 |
* Other portions of the Java API may define other subsets for their
|
jaroslav@68
|
585 |
* own purposes.
|
jaroslav@68
|
586 |
*
|
jaroslav@68
|
587 |
* @since 1.2
|
jaroslav@68
|
588 |
*/
|
jaroslav@68
|
589 |
public static class Subset {
|
jaroslav@68
|
590 |
|
jaroslav@68
|
591 |
private String name;
|
jaroslav@68
|
592 |
|
jaroslav@68
|
593 |
/**
|
jaroslav@68
|
594 |
* Constructs a new {@code Subset} instance.
|
jaroslav@68
|
595 |
*
|
jaroslav@68
|
596 |
* @param name The name of this subset
|
jaroslav@68
|
597 |
* @exception NullPointerException if name is {@code null}
|
jaroslav@68
|
598 |
*/
|
jaroslav@68
|
599 |
protected Subset(String name) {
|
jaroslav@68
|
600 |
if (name == null) {
|
jaroslav@68
|
601 |
throw new NullPointerException("name");
|
jaroslav@68
|
602 |
}
|
jaroslav@68
|
603 |
this.name = name;
|
jaroslav@68
|
604 |
}
|
jaroslav@68
|
605 |
|
jaroslav@68
|
606 |
/**
|
jaroslav@68
|
607 |
* Compares two {@code Subset} objects for equality.
|
jaroslav@68
|
608 |
* This method returns {@code true} if and only if
|
jaroslav@68
|
609 |
* {@code this} and the argument refer to the same
|
jaroslav@68
|
610 |
* object; since this method is {@code final}, this
|
jaroslav@68
|
611 |
* guarantee holds for all subclasses.
|
jaroslav@68
|
612 |
*/
|
jaroslav@68
|
613 |
public final boolean equals(Object obj) {
|
jaroslav@68
|
614 |
return (this == obj);
|
jaroslav@68
|
615 |
}
|
jaroslav@68
|
616 |
|
jaroslav@68
|
617 |
/**
|
jaroslav@68
|
618 |
* Returns the standard hash code as defined by the
|
jaroslav@68
|
619 |
* {@link Object#hashCode} method. This method
|
jaroslav@68
|
620 |
* is {@code final} in order to ensure that the
|
jaroslav@68
|
621 |
* {@code equals} and {@code hashCode} methods will
|
jaroslav@68
|
622 |
* be consistent in all subclasses.
|
jaroslav@68
|
623 |
*/
|
jaroslav@68
|
624 |
public final int hashCode() {
|
jaroslav@68
|
625 |
return super.hashCode();
|
jaroslav@68
|
626 |
}
|
jaroslav@68
|
627 |
|
jaroslav@68
|
628 |
/**
|
jaroslav@68
|
629 |
* Returns the name of this subset.
|
jaroslav@68
|
630 |
*/
|
jaroslav@68
|
631 |
public final String toString() {
|
jaroslav@68
|
632 |
return name;
|
jaroslav@68
|
633 |
}
|
jaroslav@68
|
634 |
}
|
jaroslav@68
|
635 |
|
jaroslav@68
|
636 |
// See http://www.unicode.org/Public/UNIDATA/Blocks.txt
|
jaroslav@68
|
637 |
// for the latest specification of Unicode Blocks.
|
jaroslav@68
|
638 |
|
jaroslav@68
|
639 |
/**
|
jaroslav@68
|
640 |
* A family of character subsets representing the character blocks in the
|
jaroslav@68
|
641 |
* Unicode specification. Character blocks generally define characters
|
jaroslav@68
|
642 |
* used for a specific script or purpose. A character is contained by
|
jaroslav@68
|
643 |
* at most one Unicode block.
|
jaroslav@68
|
644 |
*
|
jaroslav@68
|
645 |
* @since 1.2
|
jaroslav@68
|
646 |
*/
|
jaroslav@68
|
647 |
public static final class UnicodeBlock extends Subset {
|
jaroslav@68
|
648 |
|
jaroslav@68
|
649 |
private static Map<String, UnicodeBlock> map = new HashMap<>(256);
|
jaroslav@68
|
650 |
|
jaroslav@68
|
651 |
/**
|
jaroslav@68
|
652 |
* Creates a UnicodeBlock with the given identifier name.
|
jaroslav@68
|
653 |
* This name must be the same as the block identifier.
|
jaroslav@68
|
654 |
*/
|
jaroslav@68
|
655 |
private UnicodeBlock(String idName) {
|
jaroslav@68
|
656 |
super(idName);
|
jaroslav@68
|
657 |
map.put(idName, this);
|
jaroslav@68
|
658 |
}
|
jaroslav@68
|
659 |
|
jaroslav@68
|
660 |
/**
|
jaroslav@68
|
661 |
* Creates a UnicodeBlock with the given identifier name and
|
jaroslav@68
|
662 |
* alias name.
|
jaroslav@68
|
663 |
*/
|
jaroslav@68
|
664 |
private UnicodeBlock(String idName, String alias) {
|
jaroslav@68
|
665 |
this(idName);
|
jaroslav@68
|
666 |
map.put(alias, this);
|
jaroslav@68
|
667 |
}
|
jaroslav@68
|
668 |
|
jaroslav@68
|
669 |
/**
|
jaroslav@68
|
670 |
* Creates a UnicodeBlock with the given identifier name and
|
jaroslav@68
|
671 |
* alias names.
|
jaroslav@68
|
672 |
*/
|
jaroslav@68
|
673 |
private UnicodeBlock(String idName, String... aliases) {
|
jaroslav@68
|
674 |
this(idName);
|
jaroslav@68
|
675 |
for (String alias : aliases)
|
jaroslav@68
|
676 |
map.put(alias, this);
|
jaroslav@68
|
677 |
}
|
jaroslav@68
|
678 |
|
jaroslav@68
|
679 |
/**
|
jaroslav@68
|
680 |
* Constant for the "Basic Latin" Unicode character block.
|
jaroslav@68
|
681 |
* @since 1.2
|
jaroslav@68
|
682 |
*/
|
jaroslav@68
|
683 |
public static final UnicodeBlock BASIC_LATIN =
|
jaroslav@68
|
684 |
new UnicodeBlock("BASIC_LATIN",
|
jaroslav@68
|
685 |
"BASIC LATIN",
|
jaroslav@68
|
686 |
"BASICLATIN");
|
jaroslav@68
|
687 |
|
jaroslav@68
|
688 |
/**
|
jaroslav@68
|
689 |
* Constant for the "Latin-1 Supplement" Unicode character block.
|
jaroslav@68
|
690 |
* @since 1.2
|
jaroslav@68
|
691 |
*/
|
jaroslav@68
|
692 |
public static final UnicodeBlock LATIN_1_SUPPLEMENT =
|
jaroslav@68
|
693 |
new UnicodeBlock("LATIN_1_SUPPLEMENT",
|
jaroslav@68
|
694 |
"LATIN-1 SUPPLEMENT",
|
jaroslav@68
|
695 |
"LATIN-1SUPPLEMENT");
|
jaroslav@68
|
696 |
|
jaroslav@68
|
697 |
/**
|
jaroslav@68
|
698 |
* Constant for the "Latin Extended-A" Unicode character block.
|
jaroslav@68
|
699 |
* @since 1.2
|
jaroslav@68
|
700 |
*/
|
jaroslav@68
|
701 |
public static final UnicodeBlock LATIN_EXTENDED_A =
|
jaroslav@68
|
702 |
new UnicodeBlock("LATIN_EXTENDED_A",
|
jaroslav@68
|
703 |
"LATIN EXTENDED-A",
|
jaroslav@68
|
704 |
"LATINEXTENDED-A");
|
jaroslav@68
|
705 |
|
jaroslav@68
|
706 |
/**
|
jaroslav@68
|
707 |
* Constant for the "Latin Extended-B" Unicode character block.
|
jaroslav@68
|
708 |
* @since 1.2
|
jaroslav@68
|
709 |
*/
|
jaroslav@68
|
710 |
public static final UnicodeBlock LATIN_EXTENDED_B =
|
jaroslav@68
|
711 |
new UnicodeBlock("LATIN_EXTENDED_B",
|
jaroslav@68
|
712 |
"LATIN EXTENDED-B",
|
jaroslav@68
|
713 |
"LATINEXTENDED-B");
|
jaroslav@68
|
714 |
|
jaroslav@68
|
715 |
/**
|
jaroslav@68
|
716 |
* Constant for the "IPA Extensions" Unicode character block.
|
jaroslav@68
|
717 |
* @since 1.2
|
jaroslav@68
|
718 |
*/
|
jaroslav@68
|
719 |
public static final UnicodeBlock IPA_EXTENSIONS =
|
jaroslav@68
|
720 |
new UnicodeBlock("IPA_EXTENSIONS",
|
jaroslav@68
|
721 |
"IPA EXTENSIONS",
|
jaroslav@68
|
722 |
"IPAEXTENSIONS");
|
jaroslav@68
|
723 |
|
jaroslav@68
|
724 |
/**
|
jaroslav@68
|
725 |
* Constant for the "Spacing Modifier Letters" Unicode character block.
|
jaroslav@68
|
726 |
* @since 1.2
|
jaroslav@68
|
727 |
*/
|
jaroslav@68
|
728 |
public static final UnicodeBlock SPACING_MODIFIER_LETTERS =
|
jaroslav@68
|
729 |
new UnicodeBlock("SPACING_MODIFIER_LETTERS",
|
jaroslav@68
|
730 |
"SPACING MODIFIER LETTERS",
|
jaroslav@68
|
731 |
"SPACINGMODIFIERLETTERS");
|
jaroslav@68
|
732 |
|
jaroslav@68
|
733 |
/**
|
jaroslav@68
|
734 |
* Constant for the "Combining Diacritical Marks" Unicode character block.
|
jaroslav@68
|
735 |
* @since 1.2
|
jaroslav@68
|
736 |
*/
|
jaroslav@68
|
737 |
public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS =
|
jaroslav@68
|
738 |
new UnicodeBlock("COMBINING_DIACRITICAL_MARKS",
|
jaroslav@68
|
739 |
"COMBINING DIACRITICAL MARKS",
|
jaroslav@68
|
740 |
"COMBININGDIACRITICALMARKS");
|
jaroslav@68
|
741 |
|
jaroslav@68
|
742 |
/**
|
jaroslav@68
|
743 |
* Constant for the "Greek and Coptic" Unicode character block.
|
jaroslav@68
|
744 |
* <p>
|
jaroslav@68
|
745 |
* This block was previously known as the "Greek" block.
|
jaroslav@68
|
746 |
*
|
jaroslav@68
|
747 |
* @since 1.2
|
jaroslav@68
|
748 |
*/
|
jaroslav@68
|
749 |
public static final UnicodeBlock GREEK =
|
jaroslav@68
|
750 |
new UnicodeBlock("GREEK",
|
jaroslav@68
|
751 |
"GREEK AND COPTIC",
|
jaroslav@68
|
752 |
"GREEKANDCOPTIC");
|
jaroslav@68
|
753 |
|
jaroslav@68
|
754 |
/**
|
jaroslav@68
|
755 |
* Constant for the "Cyrillic" Unicode character block.
|
jaroslav@68
|
756 |
* @since 1.2
|
jaroslav@68
|
757 |
*/
|
jaroslav@68
|
758 |
public static final UnicodeBlock CYRILLIC =
|
jaroslav@68
|
759 |
new UnicodeBlock("CYRILLIC");
|
jaroslav@68
|
760 |
|
jaroslav@68
|
761 |
/**
|
jaroslav@68
|
762 |
* Constant for the "Armenian" Unicode character block.
|
jaroslav@68
|
763 |
* @since 1.2
|
jaroslav@68
|
764 |
*/
|
jaroslav@68
|
765 |
public static final UnicodeBlock ARMENIAN =
|
jaroslav@68
|
766 |
new UnicodeBlock("ARMENIAN");
|
jaroslav@68
|
767 |
|
jaroslav@68
|
768 |
/**
|
jaroslav@68
|
769 |
* Constant for the "Hebrew" Unicode character block.
|
jaroslav@68
|
770 |
* @since 1.2
|
jaroslav@68
|
771 |
*/
|
jaroslav@68
|
772 |
public static final UnicodeBlock HEBREW =
|
jaroslav@68
|
773 |
new UnicodeBlock("HEBREW");
|
jaroslav@68
|
774 |
|
jaroslav@68
|
775 |
/**
|
jaroslav@68
|
776 |
* Constant for the "Arabic" Unicode character block.
|
jaroslav@68
|
777 |
* @since 1.2
|
jaroslav@68
|
778 |
*/
|
jaroslav@68
|
779 |
public static final UnicodeBlock ARABIC =
|
jaroslav@68
|
780 |
new UnicodeBlock("ARABIC");
|
jaroslav@68
|
781 |
|
jaroslav@68
|
782 |
/**
|
jaroslav@68
|
783 |
* Constant for the "Devanagari" Unicode character block.
|
jaroslav@68
|
784 |
* @since 1.2
|
jaroslav@68
|
785 |
*/
|
jaroslav@68
|
786 |
public static final UnicodeBlock DEVANAGARI =
|
jaroslav@68
|
787 |
new UnicodeBlock("DEVANAGARI");
|
jaroslav@68
|
788 |
|
jaroslav@68
|
789 |
/**
|
jaroslav@68
|
790 |
* Constant for the "Bengali" Unicode character block.
|
jaroslav@68
|
791 |
* @since 1.2
|
jaroslav@68
|
792 |
*/
|
jaroslav@68
|
793 |
public static final UnicodeBlock BENGALI =
|
jaroslav@68
|
794 |
new UnicodeBlock("BENGALI");
|
jaroslav@68
|
795 |
|
jaroslav@68
|
796 |
/**
|
jaroslav@68
|
797 |
* Constant for the "Gurmukhi" Unicode character block.
|
jaroslav@68
|
798 |
* @since 1.2
|
jaroslav@68
|
799 |
*/
|
jaroslav@68
|
800 |
public static final UnicodeBlock GURMUKHI =
|
jaroslav@68
|
801 |
new UnicodeBlock("GURMUKHI");
|
jaroslav@68
|
802 |
|
jaroslav@68
|
803 |
/**
|
jaroslav@68
|
804 |
* Constant for the "Gujarati" Unicode character block.
|
jaroslav@68
|
805 |
* @since 1.2
|
jaroslav@68
|
806 |
*/
|
jaroslav@68
|
807 |
public static final UnicodeBlock GUJARATI =
|
jaroslav@68
|
808 |
new UnicodeBlock("GUJARATI");
|
jaroslav@68
|
809 |
|
jaroslav@68
|
810 |
/**
|
jaroslav@68
|
811 |
* Constant for the "Oriya" Unicode character block.
|
jaroslav@68
|
812 |
* @since 1.2
|
jaroslav@68
|
813 |
*/
|
jaroslav@68
|
814 |
public static final UnicodeBlock ORIYA =
|
jaroslav@68
|
815 |
new UnicodeBlock("ORIYA");
|
jaroslav@68
|
816 |
|
jaroslav@68
|
817 |
/**
|
jaroslav@68
|
818 |
* Constant for the "Tamil" Unicode character block.
|
jaroslav@68
|
819 |
* @since 1.2
|
jaroslav@68
|
820 |
*/
|
jaroslav@68
|
821 |
public static final UnicodeBlock TAMIL =
|
jaroslav@68
|
822 |
new UnicodeBlock("TAMIL");
|
jaroslav@68
|
823 |
|
jaroslav@68
|
824 |
/**
|
jaroslav@68
|
825 |
* Constant for the "Telugu" Unicode character block.
|
jaroslav@68
|
826 |
* @since 1.2
|
jaroslav@68
|
827 |
*/
|
jaroslav@68
|
828 |
public static final UnicodeBlock TELUGU =
|
jaroslav@68
|
829 |
new UnicodeBlock("TELUGU");
|
jaroslav@68
|
830 |
|
jaroslav@68
|
831 |
/**
|
jaroslav@68
|
832 |
* Constant for the "Kannada" Unicode character block.
|
jaroslav@68
|
833 |
* @since 1.2
|
jaroslav@68
|
834 |
*/
|
jaroslav@68
|
835 |
public static final UnicodeBlock KANNADA =
|
jaroslav@68
|
836 |
new UnicodeBlock("KANNADA");
|
jaroslav@68
|
837 |
|
jaroslav@68
|
838 |
/**
|
jaroslav@68
|
839 |
* Constant for the "Malayalam" Unicode character block.
|
jaroslav@68
|
840 |
* @since 1.2
|
jaroslav@68
|
841 |
*/
|
jaroslav@68
|
842 |
public static final UnicodeBlock MALAYALAM =
|
jaroslav@68
|
843 |
new UnicodeBlock("MALAYALAM");
|
jaroslav@68
|
844 |
|
jaroslav@68
|
845 |
/**
|
jaroslav@68
|
846 |
* Constant for the "Thai" Unicode character block.
|
jaroslav@68
|
847 |
* @since 1.2
|
jaroslav@68
|
848 |
*/
|
jaroslav@68
|
849 |
public static final UnicodeBlock THAI =
|
jaroslav@68
|
850 |
new UnicodeBlock("THAI");
|
jaroslav@68
|
851 |
|
jaroslav@68
|
852 |
/**
|
jaroslav@68
|
853 |
* Constant for the "Lao" Unicode character block.
|
jaroslav@68
|
854 |
* @since 1.2
|
jaroslav@68
|
855 |
*/
|
jaroslav@68
|
856 |
public static final UnicodeBlock LAO =
|
jaroslav@68
|
857 |
new UnicodeBlock("LAO");
|
jaroslav@68
|
858 |
|
jaroslav@68
|
859 |
/**
|
jaroslav@68
|
860 |
* Constant for the "Tibetan" Unicode character block.
|
jaroslav@68
|
861 |
* @since 1.2
|
jaroslav@68
|
862 |
*/
|
jaroslav@68
|
863 |
public static final UnicodeBlock TIBETAN =
|
jaroslav@68
|
864 |
new UnicodeBlock("TIBETAN");
|
jaroslav@68
|
865 |
|
jaroslav@68
|
866 |
/**
|
jaroslav@68
|
867 |
* Constant for the "Georgian" Unicode character block.
|
jaroslav@68
|
868 |
* @since 1.2
|
jaroslav@68
|
869 |
*/
|
jaroslav@68
|
870 |
public static final UnicodeBlock GEORGIAN =
|
jaroslav@68
|
871 |
new UnicodeBlock("GEORGIAN");
|
jaroslav@68
|
872 |
|
jaroslav@68
|
873 |
/**
|
jaroslav@68
|
874 |
* Constant for the "Hangul Jamo" Unicode character block.
|
jaroslav@68
|
875 |
* @since 1.2
|
jaroslav@68
|
876 |
*/
|
jaroslav@68
|
877 |
public static final UnicodeBlock HANGUL_JAMO =
|
jaroslav@68
|
878 |
new UnicodeBlock("HANGUL_JAMO",
|
jaroslav@68
|
879 |
"HANGUL JAMO",
|
jaroslav@68
|
880 |
"HANGULJAMO");
|
jaroslav@68
|
881 |
|
jaroslav@68
|
882 |
/**
|
jaroslav@68
|
883 |
* Constant for the "Latin Extended Additional" Unicode character block.
|
jaroslav@68
|
884 |
* @since 1.2
|
jaroslav@68
|
885 |
*/
|
jaroslav@68
|
886 |
public static final UnicodeBlock LATIN_EXTENDED_ADDITIONAL =
|
jaroslav@68
|
887 |
new UnicodeBlock("LATIN_EXTENDED_ADDITIONAL",
|
jaroslav@68
|
888 |
"LATIN EXTENDED ADDITIONAL",
|
jaroslav@68
|
889 |
"LATINEXTENDEDADDITIONAL");
|
jaroslav@68
|
890 |
|
jaroslav@68
|
891 |
/**
|
jaroslav@68
|
892 |
* Constant for the "Greek Extended" Unicode character block.
|
jaroslav@68
|
893 |
* @since 1.2
|
jaroslav@68
|
894 |
*/
|
jaroslav@68
|
895 |
public static final UnicodeBlock GREEK_EXTENDED =
|
jaroslav@68
|
896 |
new UnicodeBlock("GREEK_EXTENDED",
|
jaroslav@68
|
897 |
"GREEK EXTENDED",
|
jaroslav@68
|
898 |
"GREEKEXTENDED");
|
jaroslav@68
|
899 |
|
jaroslav@68
|
900 |
/**
|
jaroslav@68
|
901 |
* Constant for the "General Punctuation" Unicode character block.
|
jaroslav@68
|
902 |
* @since 1.2
|
jaroslav@68
|
903 |
*/
|
jaroslav@68
|
904 |
public static final UnicodeBlock GENERAL_PUNCTUATION =
|
jaroslav@68
|
905 |
new UnicodeBlock("GENERAL_PUNCTUATION",
|
jaroslav@68
|
906 |
"GENERAL PUNCTUATION",
|
jaroslav@68
|
907 |
"GENERALPUNCTUATION");
|
jaroslav@68
|
908 |
|
jaroslav@68
|
909 |
/**
|
jaroslav@68
|
910 |
* Constant for the "Superscripts and Subscripts" Unicode character
|
jaroslav@68
|
911 |
* block.
|
jaroslav@68
|
912 |
* @since 1.2
|
jaroslav@68
|
913 |
*/
|
jaroslav@68
|
914 |
public static final UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS =
|
jaroslav@68
|
915 |
new UnicodeBlock("SUPERSCRIPTS_AND_SUBSCRIPTS",
|
jaroslav@68
|
916 |
"SUPERSCRIPTS AND SUBSCRIPTS",
|
jaroslav@68
|
917 |
"SUPERSCRIPTSANDSUBSCRIPTS");
|
jaroslav@68
|
918 |
|
jaroslav@68
|
919 |
/**
|
jaroslav@68
|
920 |
* Constant for the "Currency Symbols" Unicode character block.
|
jaroslav@68
|
921 |
* @since 1.2
|
jaroslav@68
|
922 |
*/
|
jaroslav@68
|
923 |
public static final UnicodeBlock CURRENCY_SYMBOLS =
|
jaroslav@68
|
924 |
new UnicodeBlock("CURRENCY_SYMBOLS",
|
jaroslav@68
|
925 |
"CURRENCY SYMBOLS",
|
jaroslav@68
|
926 |
"CURRENCYSYMBOLS");
|
jaroslav@68
|
927 |
|
jaroslav@68
|
928 |
/**
|
jaroslav@68
|
929 |
* Constant for the "Combining Diacritical Marks for Symbols" Unicode
|
jaroslav@68
|
930 |
* character block.
|
jaroslav@68
|
931 |
* <p>
|
jaroslav@68
|
932 |
* This block was previously known as "Combining Marks for Symbols".
|
jaroslav@68
|
933 |
* @since 1.2
|
jaroslav@68
|
934 |
*/
|
jaroslav@68
|
935 |
public static final UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS =
|
jaroslav@68
|
936 |
new UnicodeBlock("COMBINING_MARKS_FOR_SYMBOLS",
|
jaroslav@68
|
937 |
"COMBINING DIACRITICAL MARKS FOR SYMBOLS",
|
jaroslav@68
|
938 |
"COMBININGDIACRITICALMARKSFORSYMBOLS",
|
jaroslav@68
|
939 |
"COMBINING MARKS FOR SYMBOLS",
|
jaroslav@68
|
940 |
"COMBININGMARKSFORSYMBOLS");
|
jaroslav@68
|
941 |
|
jaroslav@68
|
942 |
/**
|
jaroslav@68
|
943 |
* Constant for the "Letterlike Symbols" Unicode character block.
|
jaroslav@68
|
944 |
* @since 1.2
|
jaroslav@68
|
945 |
*/
|
jaroslav@68
|
946 |
public static final UnicodeBlock LETTERLIKE_SYMBOLS =
|
jaroslav@68
|
947 |
new UnicodeBlock("LETTERLIKE_SYMBOLS",
|
jaroslav@68
|
948 |
"LETTERLIKE SYMBOLS",
|
jaroslav@68
|
949 |
"LETTERLIKESYMBOLS");
|
jaroslav@68
|
950 |
|
jaroslav@68
|
951 |
/**
|
jaroslav@68
|
952 |
* Constant for the "Number Forms" Unicode character block.
|
jaroslav@68
|
953 |
* @since 1.2
|
jaroslav@68
|
954 |
*/
|
jaroslav@68
|
955 |
public static final UnicodeBlock NUMBER_FORMS =
|
jaroslav@68
|
956 |
new UnicodeBlock("NUMBER_FORMS",
|
jaroslav@68
|
957 |
"NUMBER FORMS",
|
jaroslav@68
|
958 |
"NUMBERFORMS");
|
jaroslav@68
|
959 |
|
jaroslav@68
|
960 |
/**
|
jaroslav@68
|
961 |
* Constant for the "Arrows" Unicode character block.
|
jaroslav@68
|
962 |
* @since 1.2
|
jaroslav@68
|
963 |
*/
|
jaroslav@68
|
964 |
public static final UnicodeBlock ARROWS =
|
jaroslav@68
|
965 |
new UnicodeBlock("ARROWS");
|
jaroslav@68
|
966 |
|
jaroslav@68
|
967 |
/**
|
jaroslav@68
|
968 |
* Constant for the "Mathematical Operators" Unicode character block.
|
jaroslav@68
|
969 |
* @since 1.2
|
jaroslav@68
|
970 |
*/
|
jaroslav@68
|
971 |
public static final UnicodeBlock MATHEMATICAL_OPERATORS =
|
jaroslav@68
|
972 |
new UnicodeBlock("MATHEMATICAL_OPERATORS",
|
jaroslav@68
|
973 |
"MATHEMATICAL OPERATORS",
|
jaroslav@68
|
974 |
"MATHEMATICALOPERATORS");
|
jaroslav@68
|
975 |
|
jaroslav@68
|
976 |
/**
|
jaroslav@68
|
977 |
* Constant for the "Miscellaneous Technical" Unicode character block.
|
jaroslav@68
|
978 |
* @since 1.2
|
jaroslav@68
|
979 |
*/
|
jaroslav@68
|
980 |
public static final UnicodeBlock MISCELLANEOUS_TECHNICAL =
|
jaroslav@68
|
981 |
new UnicodeBlock("MISCELLANEOUS_TECHNICAL",
|
jaroslav@68
|
982 |
"MISCELLANEOUS TECHNICAL",
|
jaroslav@68
|
983 |
"MISCELLANEOUSTECHNICAL");
|
jaroslav@68
|
984 |
|
jaroslav@68
|
985 |
/**
|
jaroslav@68
|
986 |
* Constant for the "Control Pictures" Unicode character block.
|
jaroslav@68
|
987 |
* @since 1.2
|
jaroslav@68
|
988 |
*/
|
jaroslav@68
|
989 |
public static final UnicodeBlock CONTROL_PICTURES =
|
jaroslav@68
|
990 |
new UnicodeBlock("CONTROL_PICTURES",
|
jaroslav@68
|
991 |
"CONTROL PICTURES",
|
jaroslav@68
|
992 |
"CONTROLPICTURES");
|
jaroslav@68
|
993 |
|
jaroslav@68
|
994 |
/**
|
jaroslav@68
|
995 |
* Constant for the "Optical Character Recognition" Unicode character block.
|
jaroslav@68
|
996 |
* @since 1.2
|
jaroslav@68
|
997 |
*/
|
jaroslav@68
|
998 |
public static final UnicodeBlock OPTICAL_CHARACTER_RECOGNITION =
|
jaroslav@68
|
999 |
new UnicodeBlock("OPTICAL_CHARACTER_RECOGNITION",
|
jaroslav@68
|
1000 |
"OPTICAL CHARACTER RECOGNITION",
|
jaroslav@68
|
1001 |
"OPTICALCHARACTERRECOGNITION");
|
jaroslav@68
|
1002 |
|
jaroslav@68
|
1003 |
/**
|
jaroslav@68
|
1004 |
* Constant for the "Enclosed Alphanumerics" Unicode character block.
|
jaroslav@68
|
1005 |
* @since 1.2
|
jaroslav@68
|
1006 |
*/
|
jaroslav@68
|
1007 |
public static final UnicodeBlock ENCLOSED_ALPHANUMERICS =
|
jaroslav@68
|
1008 |
new UnicodeBlock("ENCLOSED_ALPHANUMERICS",
|
jaroslav@68
|
1009 |
"ENCLOSED ALPHANUMERICS",
|
jaroslav@68
|
1010 |
"ENCLOSEDALPHANUMERICS");
|
jaroslav@68
|
1011 |
|
jaroslav@68
|
1012 |
/**
|
jaroslav@68
|
1013 |
* Constant for the "Box Drawing" Unicode character block.
|
jaroslav@68
|
1014 |
* @since 1.2
|
jaroslav@68
|
1015 |
*/
|
jaroslav@68
|
1016 |
public static final UnicodeBlock BOX_DRAWING =
|
jaroslav@68
|
1017 |
new UnicodeBlock("BOX_DRAWING",
|
jaroslav@68
|
1018 |
"BOX DRAWING",
|
jaroslav@68
|
1019 |
"BOXDRAWING");
|
jaroslav@68
|
1020 |
|
jaroslav@68
|
1021 |
/**
|
jaroslav@68
|
1022 |
* Constant for the "Block Elements" Unicode character block.
|
jaroslav@68
|
1023 |
* @since 1.2
|
jaroslav@68
|
1024 |
*/
|
jaroslav@68
|
1025 |
public static final UnicodeBlock BLOCK_ELEMENTS =
|
jaroslav@68
|
1026 |
new UnicodeBlock("BLOCK_ELEMENTS",
|
jaroslav@68
|
1027 |
"BLOCK ELEMENTS",
|
jaroslav@68
|
1028 |
"BLOCKELEMENTS");
|
jaroslav@68
|
1029 |
|
jaroslav@68
|
1030 |
/**
|
jaroslav@68
|
1031 |
* Constant for the "Geometric Shapes" Unicode character block.
|
jaroslav@68
|
1032 |
* @since 1.2
|
jaroslav@68
|
1033 |
*/
|
jaroslav@68
|
1034 |
public static final UnicodeBlock GEOMETRIC_SHAPES =
|
jaroslav@68
|
1035 |
new UnicodeBlock("GEOMETRIC_SHAPES",
|
jaroslav@68
|
1036 |
"GEOMETRIC SHAPES",
|
jaroslav@68
|
1037 |
"GEOMETRICSHAPES");
|
jaroslav@68
|
1038 |
|
jaroslav@68
|
1039 |
/**
|
jaroslav@68
|
1040 |
* Constant for the "Miscellaneous Symbols" Unicode character block.
|
jaroslav@68
|
1041 |
* @since 1.2
|
jaroslav@68
|
1042 |
*/
|
jaroslav@68
|
1043 |
public static final UnicodeBlock MISCELLANEOUS_SYMBOLS =
|
jaroslav@68
|
1044 |
new UnicodeBlock("MISCELLANEOUS_SYMBOLS",
|
jaroslav@68
|
1045 |
"MISCELLANEOUS SYMBOLS",
|
jaroslav@68
|
1046 |
"MISCELLANEOUSSYMBOLS");
|
jaroslav@68
|
1047 |
|
jaroslav@68
|
1048 |
/**
|
jaroslav@68
|
1049 |
* Constant for the "Dingbats" Unicode character block.
|
jaroslav@68
|
1050 |
* @since 1.2
|
jaroslav@68
|
1051 |
*/
|
jaroslav@68
|
1052 |
public static final UnicodeBlock DINGBATS =
|
jaroslav@68
|
1053 |
new UnicodeBlock("DINGBATS");
|
jaroslav@68
|
1054 |
|
jaroslav@68
|
1055 |
/**
|
jaroslav@68
|
1056 |
* Constant for the "CJK Symbols and Punctuation" Unicode character block.
|
jaroslav@68
|
1057 |
* @since 1.2
|
jaroslav@68
|
1058 |
*/
|
jaroslav@68
|
1059 |
public static final UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION =
|
jaroslav@68
|
1060 |
new UnicodeBlock("CJK_SYMBOLS_AND_PUNCTUATION",
|
jaroslav@68
|
1061 |
"CJK SYMBOLS AND PUNCTUATION",
|
jaroslav@68
|
1062 |
"CJKSYMBOLSANDPUNCTUATION");
|
jaroslav@68
|
1063 |
|
jaroslav@68
|
1064 |
/**
|
jaroslav@68
|
1065 |
* Constant for the "Hiragana" Unicode character block.
|
jaroslav@68
|
1066 |
* @since 1.2
|
jaroslav@68
|
1067 |
*/
|
jaroslav@68
|
1068 |
public static final UnicodeBlock HIRAGANA =
|
jaroslav@68
|
1069 |
new UnicodeBlock("HIRAGANA");
|
jaroslav@68
|
1070 |
|
jaroslav@68
|
1071 |
/**
|
jaroslav@68
|
1072 |
* Constant for the "Katakana" Unicode character block.
|
jaroslav@68
|
1073 |
* @since 1.2
|
jaroslav@68
|
1074 |
*/
|
jaroslav@68
|
1075 |
public static final UnicodeBlock KATAKANA =
|
jaroslav@68
|
1076 |
new UnicodeBlock("KATAKANA");
|
jaroslav@68
|
1077 |
|
jaroslav@68
|
1078 |
/**
|
jaroslav@68
|
1079 |
* Constant for the "Bopomofo" Unicode character block.
|
jaroslav@68
|
1080 |
* @since 1.2
|
jaroslav@68
|
1081 |
*/
|
jaroslav@68
|
1082 |
public static final UnicodeBlock BOPOMOFO =
|
jaroslav@68
|
1083 |
new UnicodeBlock("BOPOMOFO");
|
jaroslav@68
|
1084 |
|
jaroslav@68
|
1085 |
/**
|
jaroslav@68
|
1086 |
* Constant for the "Hangul Compatibility Jamo" Unicode character block.
|
jaroslav@68
|
1087 |
* @since 1.2
|
jaroslav@68
|
1088 |
*/
|
jaroslav@68
|
1089 |
public static final UnicodeBlock HANGUL_COMPATIBILITY_JAMO =
|
jaroslav@68
|
1090 |
new UnicodeBlock("HANGUL_COMPATIBILITY_JAMO",
|
jaroslav@68
|
1091 |
"HANGUL COMPATIBILITY JAMO",
|
jaroslav@68
|
1092 |
"HANGULCOMPATIBILITYJAMO");
|
jaroslav@68
|
1093 |
|
jaroslav@68
|
1094 |
/**
|
jaroslav@68
|
1095 |
* Constant for the "Kanbun" Unicode character block.
|
jaroslav@68
|
1096 |
* @since 1.2
|
jaroslav@68
|
1097 |
*/
|
jaroslav@68
|
1098 |
public static final UnicodeBlock KANBUN =
|
jaroslav@68
|
1099 |
new UnicodeBlock("KANBUN");
|
jaroslav@68
|
1100 |
|
jaroslav@68
|
1101 |
/**
|
jaroslav@68
|
1102 |
* Constant for the "Enclosed CJK Letters and Months" Unicode character block.
|
jaroslav@68
|
1103 |
* @since 1.2
|
jaroslav@68
|
1104 |
*/
|
jaroslav@68
|
1105 |
public static final UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS =
|
jaroslav@68
|
1106 |
new UnicodeBlock("ENCLOSED_CJK_LETTERS_AND_MONTHS",
|
jaroslav@68
|
1107 |
"ENCLOSED CJK LETTERS AND MONTHS",
|
jaroslav@68
|
1108 |
"ENCLOSEDCJKLETTERSANDMONTHS");
|
jaroslav@68
|
1109 |
|
jaroslav@68
|
1110 |
/**
|
jaroslav@68
|
1111 |
* Constant for the "CJK Compatibility" Unicode character block.
|
jaroslav@68
|
1112 |
* @since 1.2
|
jaroslav@68
|
1113 |
*/
|
jaroslav@68
|
1114 |
public static final UnicodeBlock CJK_COMPATIBILITY =
|
jaroslav@68
|
1115 |
new UnicodeBlock("CJK_COMPATIBILITY",
|
jaroslav@68
|
1116 |
"CJK COMPATIBILITY",
|
jaroslav@68
|
1117 |
"CJKCOMPATIBILITY");
|
jaroslav@68
|
1118 |
|
jaroslav@68
|
1119 |
/**
|
jaroslav@68
|
1120 |
* Constant for the "CJK Unified Ideographs" Unicode character block.
|
jaroslav@68
|
1121 |
* @since 1.2
|
jaroslav@68
|
1122 |
*/
|
jaroslav@68
|
1123 |
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS =
|
jaroslav@68
|
1124 |
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS",
|
jaroslav@68
|
1125 |
"CJK UNIFIED IDEOGRAPHS",
|
jaroslav@68
|
1126 |
"CJKUNIFIEDIDEOGRAPHS");
|
jaroslav@68
|
1127 |
|
jaroslav@68
|
1128 |
/**
|
jaroslav@68
|
1129 |
* Constant for the "Hangul Syllables" Unicode character block.
|
jaroslav@68
|
1130 |
* @since 1.2
|
jaroslav@68
|
1131 |
*/
|
jaroslav@68
|
1132 |
public static final UnicodeBlock HANGUL_SYLLABLES =
|
jaroslav@68
|
1133 |
new UnicodeBlock("HANGUL_SYLLABLES",
|
jaroslav@68
|
1134 |
"HANGUL SYLLABLES",
|
jaroslav@68
|
1135 |
"HANGULSYLLABLES");
|
jaroslav@68
|
1136 |
|
jaroslav@68
|
1137 |
/**
|
jaroslav@68
|
1138 |
* Constant for the "Private Use Area" Unicode character block.
|
jaroslav@68
|
1139 |
* @since 1.2
|
jaroslav@68
|
1140 |
*/
|
jaroslav@68
|
1141 |
public static final UnicodeBlock PRIVATE_USE_AREA =
|
jaroslav@68
|
1142 |
new UnicodeBlock("PRIVATE_USE_AREA",
|
jaroslav@68
|
1143 |
"PRIVATE USE AREA",
|
jaroslav@68
|
1144 |
"PRIVATEUSEAREA");
|
jaroslav@68
|
1145 |
|
jaroslav@68
|
1146 |
/**
|
jaroslav@68
|
1147 |
* Constant for the "CJK Compatibility Ideographs" Unicode character
|
jaroslav@68
|
1148 |
* block.
|
jaroslav@68
|
1149 |
* @since 1.2
|
jaroslav@68
|
1150 |
*/
|
jaroslav@68
|
1151 |
public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS =
|
jaroslav@68
|
1152 |
new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS",
|
jaroslav@68
|
1153 |
"CJK COMPATIBILITY IDEOGRAPHS",
|
jaroslav@68
|
1154 |
"CJKCOMPATIBILITYIDEOGRAPHS");
|
jaroslav@68
|
1155 |
|
jaroslav@68
|
1156 |
/**
|
jaroslav@68
|
1157 |
* Constant for the "Alphabetic Presentation Forms" Unicode character block.
|
jaroslav@68
|
1158 |
* @since 1.2
|
jaroslav@68
|
1159 |
*/
|
jaroslav@68
|
1160 |
public static final UnicodeBlock ALPHABETIC_PRESENTATION_FORMS =
|
jaroslav@68
|
1161 |
new UnicodeBlock("ALPHABETIC_PRESENTATION_FORMS",
|
jaroslav@68
|
1162 |
"ALPHABETIC PRESENTATION FORMS",
|
jaroslav@68
|
1163 |
"ALPHABETICPRESENTATIONFORMS");
|
jaroslav@68
|
1164 |
|
jaroslav@68
|
1165 |
/**
|
jaroslav@68
|
1166 |
* Constant for the "Arabic Presentation Forms-A" Unicode character
|
jaroslav@68
|
1167 |
* block.
|
jaroslav@68
|
1168 |
* @since 1.2
|
jaroslav@68
|
1169 |
*/
|
jaroslav@68
|
1170 |
public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_A =
|
jaroslav@68
|
1171 |
new UnicodeBlock("ARABIC_PRESENTATION_FORMS_A",
|
jaroslav@68
|
1172 |
"ARABIC PRESENTATION FORMS-A",
|
jaroslav@68
|
1173 |
"ARABICPRESENTATIONFORMS-A");
|
jaroslav@68
|
1174 |
|
jaroslav@68
|
1175 |
/**
|
jaroslav@68
|
1176 |
* Constant for the "Combining Half Marks" Unicode character block.
|
jaroslav@68
|
1177 |
* @since 1.2
|
jaroslav@68
|
1178 |
*/
|
jaroslav@68
|
1179 |
public static final UnicodeBlock COMBINING_HALF_MARKS =
|
jaroslav@68
|
1180 |
new UnicodeBlock("COMBINING_HALF_MARKS",
|
jaroslav@68
|
1181 |
"COMBINING HALF MARKS",
|
jaroslav@68
|
1182 |
"COMBININGHALFMARKS");
|
jaroslav@68
|
1183 |
|
jaroslav@68
|
1184 |
/**
|
jaroslav@68
|
1185 |
* Constant for the "CJK Compatibility Forms" Unicode character block.
|
jaroslav@68
|
1186 |
* @since 1.2
|
jaroslav@68
|
1187 |
*/
|
jaroslav@68
|
1188 |
public static final UnicodeBlock CJK_COMPATIBILITY_FORMS =
|
jaroslav@68
|
1189 |
new UnicodeBlock("CJK_COMPATIBILITY_FORMS",
|
jaroslav@68
|
1190 |
"CJK COMPATIBILITY FORMS",
|
jaroslav@68
|
1191 |
"CJKCOMPATIBILITYFORMS");
|
jaroslav@68
|
1192 |
|
jaroslav@68
|
1193 |
/**
|
jaroslav@68
|
1194 |
* Constant for the "Small Form Variants" Unicode character block.
|
jaroslav@68
|
1195 |
* @since 1.2
|
jaroslav@68
|
1196 |
*/
|
jaroslav@68
|
1197 |
public static final UnicodeBlock SMALL_FORM_VARIANTS =
|
jaroslav@68
|
1198 |
new UnicodeBlock("SMALL_FORM_VARIANTS",
|
jaroslav@68
|
1199 |
"SMALL FORM VARIANTS",
|
jaroslav@68
|
1200 |
"SMALLFORMVARIANTS");
|
jaroslav@68
|
1201 |
|
jaroslav@68
|
1202 |
/**
|
jaroslav@68
|
1203 |
* Constant for the "Arabic Presentation Forms-B" Unicode character block.
|
jaroslav@68
|
1204 |
* @since 1.2
|
jaroslav@68
|
1205 |
*/
|
jaroslav@68
|
1206 |
public static final UnicodeBlock ARABIC_PRESENTATION_FORMS_B =
|
jaroslav@68
|
1207 |
new UnicodeBlock("ARABIC_PRESENTATION_FORMS_B",
|
jaroslav@68
|
1208 |
"ARABIC PRESENTATION FORMS-B",
|
jaroslav@68
|
1209 |
"ARABICPRESENTATIONFORMS-B");
|
jaroslav@68
|
1210 |
|
jaroslav@68
|
1211 |
/**
|
jaroslav@68
|
1212 |
* Constant for the "Halfwidth and Fullwidth Forms" Unicode character
|
jaroslav@68
|
1213 |
* block.
|
jaroslav@68
|
1214 |
* @since 1.2
|
jaroslav@68
|
1215 |
*/
|
jaroslav@68
|
1216 |
public static final UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS =
|
jaroslav@68
|
1217 |
new UnicodeBlock("HALFWIDTH_AND_FULLWIDTH_FORMS",
|
jaroslav@68
|
1218 |
"HALFWIDTH AND FULLWIDTH FORMS",
|
jaroslav@68
|
1219 |
"HALFWIDTHANDFULLWIDTHFORMS");
|
jaroslav@68
|
1220 |
|
jaroslav@68
|
1221 |
/**
|
jaroslav@68
|
1222 |
* Constant for the "Specials" Unicode character block.
|
jaroslav@68
|
1223 |
* @since 1.2
|
jaroslav@68
|
1224 |
*/
|
jaroslav@68
|
1225 |
public static final UnicodeBlock SPECIALS =
|
jaroslav@68
|
1226 |
new UnicodeBlock("SPECIALS");
|
jaroslav@68
|
1227 |
|
jaroslav@68
|
1228 |
/**
|
jaroslav@68
|
1229 |
* @deprecated As of J2SE 5, use {@link #HIGH_SURROGATES},
|
jaroslav@68
|
1230 |
* {@link #HIGH_PRIVATE_USE_SURROGATES}, and
|
jaroslav@68
|
1231 |
* {@link #LOW_SURROGATES}. These new constants match
|
jaroslav@68
|
1232 |
* the block definitions of the Unicode Standard.
|
jaroslav@68
|
1233 |
* The {@link #of(char)} and {@link #of(int)} methods
|
jaroslav@68
|
1234 |
* return the new constants, not SURROGATES_AREA.
|
jaroslav@68
|
1235 |
*/
|
jaroslav@68
|
1236 |
@Deprecated
|
jaroslav@68
|
1237 |
public static final UnicodeBlock SURROGATES_AREA =
|
jaroslav@68
|
1238 |
new UnicodeBlock("SURROGATES_AREA");
|
jaroslav@68
|
1239 |
|
jaroslav@68
|
1240 |
/**
|
jaroslav@68
|
1241 |
* Constant for the "Syriac" Unicode character block.
|
jaroslav@68
|
1242 |
* @since 1.4
|
jaroslav@68
|
1243 |
*/
|
jaroslav@68
|
1244 |
public static final UnicodeBlock SYRIAC =
|
jaroslav@68
|
1245 |
new UnicodeBlock("SYRIAC");
|
jaroslav@68
|
1246 |
|
jaroslav@68
|
1247 |
/**
|
jaroslav@68
|
1248 |
* Constant for the "Thaana" Unicode character block.
|
jaroslav@68
|
1249 |
* @since 1.4
|
jaroslav@68
|
1250 |
*/
|
jaroslav@68
|
1251 |
public static final UnicodeBlock THAANA =
|
jaroslav@68
|
1252 |
new UnicodeBlock("THAANA");
|
jaroslav@68
|
1253 |
|
jaroslav@68
|
1254 |
/**
|
jaroslav@68
|
1255 |
* Constant for the "Sinhala" Unicode character block.
|
jaroslav@68
|
1256 |
* @since 1.4
|
jaroslav@68
|
1257 |
*/
|
jaroslav@68
|
1258 |
public static final UnicodeBlock SINHALA =
|
jaroslav@68
|
1259 |
new UnicodeBlock("SINHALA");
|
jaroslav@68
|
1260 |
|
jaroslav@68
|
1261 |
/**
|
jaroslav@68
|
1262 |
* Constant for the "Myanmar" Unicode character block.
|
jaroslav@68
|
1263 |
* @since 1.4
|
jaroslav@68
|
1264 |
*/
|
jaroslav@68
|
1265 |
public static final UnicodeBlock MYANMAR =
|
jaroslav@68
|
1266 |
new UnicodeBlock("MYANMAR");
|
jaroslav@68
|
1267 |
|
jaroslav@68
|
1268 |
/**
|
jaroslav@68
|
1269 |
* Constant for the "Ethiopic" Unicode character block.
|
jaroslav@68
|
1270 |
* @since 1.4
|
jaroslav@68
|
1271 |
*/
|
jaroslav@68
|
1272 |
public static final UnicodeBlock ETHIOPIC =
|
jaroslav@68
|
1273 |
new UnicodeBlock("ETHIOPIC");
|
jaroslav@68
|
1274 |
|
jaroslav@68
|
1275 |
/**
|
jaroslav@68
|
1276 |
* Constant for the "Cherokee" Unicode character block.
|
jaroslav@68
|
1277 |
* @since 1.4
|
jaroslav@68
|
1278 |
*/
|
jaroslav@68
|
1279 |
public static final UnicodeBlock CHEROKEE =
|
jaroslav@68
|
1280 |
new UnicodeBlock("CHEROKEE");
|
jaroslav@68
|
1281 |
|
jaroslav@68
|
1282 |
/**
|
jaroslav@68
|
1283 |
* Constant for the "Unified Canadian Aboriginal Syllabics" Unicode character block.
|
jaroslav@68
|
1284 |
* @since 1.4
|
jaroslav@68
|
1285 |
*/
|
jaroslav@68
|
1286 |
public static final UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS =
|
jaroslav@68
|
1287 |
new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS",
|
jaroslav@68
|
1288 |
"UNIFIED CANADIAN ABORIGINAL SYLLABICS",
|
jaroslav@68
|
1289 |
"UNIFIEDCANADIANABORIGINALSYLLABICS");
|
jaroslav@68
|
1290 |
|
jaroslav@68
|
1291 |
/**
|
jaroslav@68
|
1292 |
* Constant for the "Ogham" Unicode character block.
|
jaroslav@68
|
1293 |
* @since 1.4
|
jaroslav@68
|
1294 |
*/
|
jaroslav@68
|
1295 |
public static final UnicodeBlock OGHAM =
|
jaroslav@68
|
1296 |
new UnicodeBlock("OGHAM");
|
jaroslav@68
|
1297 |
|
jaroslav@68
|
1298 |
/**
|
jaroslav@68
|
1299 |
* Constant for the "Runic" Unicode character block.
|
jaroslav@68
|
1300 |
* @since 1.4
|
jaroslav@68
|
1301 |
*/
|
jaroslav@68
|
1302 |
public static final UnicodeBlock RUNIC =
|
jaroslav@68
|
1303 |
new UnicodeBlock("RUNIC");
|
jaroslav@68
|
1304 |
|
jaroslav@68
|
1305 |
/**
|
jaroslav@68
|
1306 |
* Constant for the "Khmer" Unicode character block.
|
jaroslav@68
|
1307 |
* @since 1.4
|
jaroslav@68
|
1308 |
*/
|
jaroslav@68
|
1309 |
public static final UnicodeBlock KHMER =
|
jaroslav@68
|
1310 |
new UnicodeBlock("KHMER");
|
jaroslav@68
|
1311 |
|
jaroslav@68
|
1312 |
/**
|
jaroslav@68
|
1313 |
* Constant for the "Mongolian" Unicode character block.
|
jaroslav@68
|
1314 |
* @since 1.4
|
jaroslav@68
|
1315 |
*/
|
jaroslav@68
|
1316 |
public static final UnicodeBlock MONGOLIAN =
|
jaroslav@68
|
1317 |
new UnicodeBlock("MONGOLIAN");
|
jaroslav@68
|
1318 |
|
jaroslav@68
|
1319 |
/**
|
jaroslav@68
|
1320 |
* Constant for the "Braille Patterns" Unicode character block.
|
jaroslav@68
|
1321 |
* @since 1.4
|
jaroslav@68
|
1322 |
*/
|
jaroslav@68
|
1323 |
public static final UnicodeBlock BRAILLE_PATTERNS =
|
jaroslav@68
|
1324 |
new UnicodeBlock("BRAILLE_PATTERNS",
|
jaroslav@68
|
1325 |
"BRAILLE PATTERNS",
|
jaroslav@68
|
1326 |
"BRAILLEPATTERNS");
|
jaroslav@68
|
1327 |
|
jaroslav@68
|
1328 |
/**
|
jaroslav@68
|
1329 |
* Constant for the "CJK Radicals Supplement" Unicode character block.
|
jaroslav@68
|
1330 |
* @since 1.4
|
jaroslav@68
|
1331 |
*/
|
jaroslav@68
|
1332 |
public static final UnicodeBlock CJK_RADICALS_SUPPLEMENT =
|
jaroslav@68
|
1333 |
new UnicodeBlock("CJK_RADICALS_SUPPLEMENT",
|
jaroslav@68
|
1334 |
"CJK RADICALS SUPPLEMENT",
|
jaroslav@68
|
1335 |
"CJKRADICALSSUPPLEMENT");
|
jaroslav@68
|
1336 |
|
jaroslav@68
|
1337 |
/**
|
jaroslav@68
|
1338 |
* Constant for the "Kangxi Radicals" Unicode character block.
|
jaroslav@68
|
1339 |
* @since 1.4
|
jaroslav@68
|
1340 |
*/
|
jaroslav@68
|
1341 |
public static final UnicodeBlock KANGXI_RADICALS =
|
jaroslav@68
|
1342 |
new UnicodeBlock("KANGXI_RADICALS",
|
jaroslav@68
|
1343 |
"KANGXI RADICALS",
|
jaroslav@68
|
1344 |
"KANGXIRADICALS");
|
jaroslav@68
|
1345 |
|
jaroslav@68
|
1346 |
/**
|
jaroslav@68
|
1347 |
* Constant for the "Ideographic Description Characters" Unicode character block.
|
jaroslav@68
|
1348 |
* @since 1.4
|
jaroslav@68
|
1349 |
*/
|
jaroslav@68
|
1350 |
public static final UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS =
|
jaroslav@68
|
1351 |
new UnicodeBlock("IDEOGRAPHIC_DESCRIPTION_CHARACTERS",
|
jaroslav@68
|
1352 |
"IDEOGRAPHIC DESCRIPTION CHARACTERS",
|
jaroslav@68
|
1353 |
"IDEOGRAPHICDESCRIPTIONCHARACTERS");
|
jaroslav@68
|
1354 |
|
jaroslav@68
|
1355 |
/**
|
jaroslav@68
|
1356 |
* Constant for the "Bopomofo Extended" Unicode character block.
|
jaroslav@68
|
1357 |
* @since 1.4
|
jaroslav@68
|
1358 |
*/
|
jaroslav@68
|
1359 |
public static final UnicodeBlock BOPOMOFO_EXTENDED =
|
jaroslav@68
|
1360 |
new UnicodeBlock("BOPOMOFO_EXTENDED",
|
jaroslav@68
|
1361 |
"BOPOMOFO EXTENDED",
|
jaroslav@68
|
1362 |
"BOPOMOFOEXTENDED");
|
jaroslav@68
|
1363 |
|
jaroslav@68
|
1364 |
/**
|
jaroslav@68
|
1365 |
* Constant for the "CJK Unified Ideographs Extension A" Unicode character block.
|
jaroslav@68
|
1366 |
* @since 1.4
|
jaroslav@68
|
1367 |
*/
|
jaroslav@68
|
1368 |
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A =
|
jaroslav@68
|
1369 |
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A",
|
jaroslav@68
|
1370 |
"CJK UNIFIED IDEOGRAPHS EXTENSION A",
|
jaroslav@68
|
1371 |
"CJKUNIFIEDIDEOGRAPHSEXTENSIONA");
|
jaroslav@68
|
1372 |
|
jaroslav@68
|
1373 |
/**
|
jaroslav@68
|
1374 |
* Constant for the "Yi Syllables" Unicode character block.
|
jaroslav@68
|
1375 |
* @since 1.4
|
jaroslav@68
|
1376 |
*/
|
jaroslav@68
|
1377 |
public static final UnicodeBlock YI_SYLLABLES =
|
jaroslav@68
|
1378 |
new UnicodeBlock("YI_SYLLABLES",
|
jaroslav@68
|
1379 |
"YI SYLLABLES",
|
jaroslav@68
|
1380 |
"YISYLLABLES");
|
jaroslav@68
|
1381 |
|
jaroslav@68
|
1382 |
/**
|
jaroslav@68
|
1383 |
* Constant for the "Yi Radicals" Unicode character block.
|
jaroslav@68
|
1384 |
* @since 1.4
|
jaroslav@68
|
1385 |
*/
|
jaroslav@68
|
1386 |
public static final UnicodeBlock YI_RADICALS =
|
jaroslav@68
|
1387 |
new UnicodeBlock("YI_RADICALS",
|
jaroslav@68
|
1388 |
"YI RADICALS",
|
jaroslav@68
|
1389 |
"YIRADICALS");
|
jaroslav@68
|
1390 |
|
jaroslav@68
|
1391 |
/**
|
jaroslav@68
|
1392 |
* Constant for the "Cyrillic Supplementary" Unicode character block.
|
jaroslav@68
|
1393 |
* @since 1.5
|
jaroslav@68
|
1394 |
*/
|
jaroslav@68
|
1395 |
public static final UnicodeBlock CYRILLIC_SUPPLEMENTARY =
|
jaroslav@68
|
1396 |
new UnicodeBlock("CYRILLIC_SUPPLEMENTARY",
|
jaroslav@68
|
1397 |
"CYRILLIC SUPPLEMENTARY",
|
jaroslav@68
|
1398 |
"CYRILLICSUPPLEMENTARY",
|
jaroslav@68
|
1399 |
"CYRILLIC SUPPLEMENT",
|
jaroslav@68
|
1400 |
"CYRILLICSUPPLEMENT");
|
jaroslav@68
|
1401 |
|
jaroslav@68
|
1402 |
/**
|
jaroslav@68
|
1403 |
* Constant for the "Tagalog" Unicode character block.
|
jaroslav@68
|
1404 |
* @since 1.5
|
jaroslav@68
|
1405 |
*/
|
jaroslav@68
|
1406 |
public static final UnicodeBlock TAGALOG =
|
jaroslav@68
|
1407 |
new UnicodeBlock("TAGALOG");
|
jaroslav@68
|
1408 |
|
jaroslav@68
|
1409 |
/**
|
jaroslav@68
|
1410 |
* Constant for the "Hanunoo" Unicode character block.
|
jaroslav@68
|
1411 |
* @since 1.5
|
jaroslav@68
|
1412 |
*/
|
jaroslav@68
|
1413 |
public static final UnicodeBlock HANUNOO =
|
jaroslav@68
|
1414 |
new UnicodeBlock("HANUNOO");
|
jaroslav@68
|
1415 |
|
jaroslav@68
|
1416 |
/**
|
jaroslav@68
|
1417 |
* Constant for the "Buhid" Unicode character block.
|
jaroslav@68
|
1418 |
* @since 1.5
|
jaroslav@68
|
1419 |
*/
|
jaroslav@68
|
1420 |
public static final UnicodeBlock BUHID =
|
jaroslav@68
|
1421 |
new UnicodeBlock("BUHID");
|
jaroslav@68
|
1422 |
|
jaroslav@68
|
1423 |
/**
|
jaroslav@68
|
1424 |
* Constant for the "Tagbanwa" Unicode character block.
|
jaroslav@68
|
1425 |
* @since 1.5
|
jaroslav@68
|
1426 |
*/
|
jaroslav@68
|
1427 |
public static final UnicodeBlock TAGBANWA =
|
jaroslav@68
|
1428 |
new UnicodeBlock("TAGBANWA");
|
jaroslav@68
|
1429 |
|
jaroslav@68
|
1430 |
/**
|
jaroslav@68
|
1431 |
* Constant for the "Limbu" Unicode character block.
|
jaroslav@68
|
1432 |
* @since 1.5
|
jaroslav@68
|
1433 |
*/
|
jaroslav@68
|
1434 |
public static final UnicodeBlock LIMBU =
|
jaroslav@68
|
1435 |
new UnicodeBlock("LIMBU");
|
jaroslav@68
|
1436 |
|
jaroslav@68
|
1437 |
/**
|
jaroslav@68
|
1438 |
* Constant for the "Tai Le" Unicode character block.
|
jaroslav@68
|
1439 |
* @since 1.5
|
jaroslav@68
|
1440 |
*/
|
jaroslav@68
|
1441 |
public static final UnicodeBlock TAI_LE =
|
jaroslav@68
|
1442 |
new UnicodeBlock("TAI_LE",
|
jaroslav@68
|
1443 |
"TAI LE",
|
jaroslav@68
|
1444 |
"TAILE");
|
jaroslav@68
|
1445 |
|
jaroslav@68
|
1446 |
/**
|
jaroslav@68
|
1447 |
* Constant for the "Khmer Symbols" Unicode character block.
|
jaroslav@68
|
1448 |
* @since 1.5
|
jaroslav@68
|
1449 |
*/
|
jaroslav@68
|
1450 |
public static final UnicodeBlock KHMER_SYMBOLS =
|
jaroslav@68
|
1451 |
new UnicodeBlock("KHMER_SYMBOLS",
|
jaroslav@68
|
1452 |
"KHMER SYMBOLS",
|
jaroslav@68
|
1453 |
"KHMERSYMBOLS");
|
jaroslav@68
|
1454 |
|
jaroslav@68
|
1455 |
/**
|
jaroslav@68
|
1456 |
* Constant for the "Phonetic Extensions" Unicode character block.
|
jaroslav@68
|
1457 |
* @since 1.5
|
jaroslav@68
|
1458 |
*/
|
jaroslav@68
|
1459 |
public static final UnicodeBlock PHONETIC_EXTENSIONS =
|
jaroslav@68
|
1460 |
new UnicodeBlock("PHONETIC_EXTENSIONS",
|
jaroslav@68
|
1461 |
"PHONETIC EXTENSIONS",
|
jaroslav@68
|
1462 |
"PHONETICEXTENSIONS");
|
jaroslav@68
|
1463 |
|
jaroslav@68
|
1464 |
/**
|
jaroslav@68
|
1465 |
* Constant for the "Miscellaneous Mathematical Symbols-A" Unicode character block.
|
jaroslav@68
|
1466 |
* @since 1.5
|
jaroslav@68
|
1467 |
*/
|
jaroslav@68
|
1468 |
public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A =
|
jaroslav@68
|
1469 |
new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A",
|
jaroslav@68
|
1470 |
"MISCELLANEOUS MATHEMATICAL SYMBOLS-A",
|
jaroslav@68
|
1471 |
"MISCELLANEOUSMATHEMATICALSYMBOLS-A");
|
jaroslav@68
|
1472 |
|
jaroslav@68
|
1473 |
/**
|
jaroslav@68
|
1474 |
* Constant for the "Supplemental Arrows-A" Unicode character block.
|
jaroslav@68
|
1475 |
* @since 1.5
|
jaroslav@68
|
1476 |
*/
|
jaroslav@68
|
1477 |
public static final UnicodeBlock SUPPLEMENTAL_ARROWS_A =
|
jaroslav@68
|
1478 |
new UnicodeBlock("SUPPLEMENTAL_ARROWS_A",
|
jaroslav@68
|
1479 |
"SUPPLEMENTAL ARROWS-A",
|
jaroslav@68
|
1480 |
"SUPPLEMENTALARROWS-A");
|
jaroslav@68
|
1481 |
|
jaroslav@68
|
1482 |
/**
|
jaroslav@68
|
1483 |
* Constant for the "Supplemental Arrows-B" Unicode character block.
|
jaroslav@68
|
1484 |
* @since 1.5
|
jaroslav@68
|
1485 |
*/
|
jaroslav@68
|
1486 |
public static final UnicodeBlock SUPPLEMENTAL_ARROWS_B =
|
jaroslav@68
|
1487 |
new UnicodeBlock("SUPPLEMENTAL_ARROWS_B",
|
jaroslav@68
|
1488 |
"SUPPLEMENTAL ARROWS-B",
|
jaroslav@68
|
1489 |
"SUPPLEMENTALARROWS-B");
|
jaroslav@68
|
1490 |
|
jaroslav@68
|
1491 |
/**
|
jaroslav@68
|
1492 |
* Constant for the "Miscellaneous Mathematical Symbols-B" Unicode
|
jaroslav@68
|
1493 |
* character block.
|
jaroslav@68
|
1494 |
* @since 1.5
|
jaroslav@68
|
1495 |
*/
|
jaroslav@68
|
1496 |
public static final UnicodeBlock MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B =
|
jaroslav@68
|
1497 |
new UnicodeBlock("MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B",
|
jaroslav@68
|
1498 |
"MISCELLANEOUS MATHEMATICAL SYMBOLS-B",
|
jaroslav@68
|
1499 |
"MISCELLANEOUSMATHEMATICALSYMBOLS-B");
|
jaroslav@68
|
1500 |
|
jaroslav@68
|
1501 |
/**
|
jaroslav@68
|
1502 |
* Constant for the "Supplemental Mathematical Operators" Unicode
|
jaroslav@68
|
1503 |
* character block.
|
jaroslav@68
|
1504 |
* @since 1.5
|
jaroslav@68
|
1505 |
*/
|
jaroslav@68
|
1506 |
public static final UnicodeBlock SUPPLEMENTAL_MATHEMATICAL_OPERATORS =
|
jaroslav@68
|
1507 |
new UnicodeBlock("SUPPLEMENTAL_MATHEMATICAL_OPERATORS",
|
jaroslav@68
|
1508 |
"SUPPLEMENTAL MATHEMATICAL OPERATORS",
|
jaroslav@68
|
1509 |
"SUPPLEMENTALMATHEMATICALOPERATORS");
|
jaroslav@68
|
1510 |
|
jaroslav@68
|
1511 |
/**
|
jaroslav@68
|
1512 |
* Constant for the "Miscellaneous Symbols and Arrows" Unicode character
|
jaroslav@68
|
1513 |
* block.
|
jaroslav@68
|
1514 |
* @since 1.5
|
jaroslav@68
|
1515 |
*/
|
jaroslav@68
|
1516 |
public static final UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_ARROWS =
|
jaroslav@68
|
1517 |
new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_ARROWS",
|
jaroslav@68
|
1518 |
"MISCELLANEOUS SYMBOLS AND ARROWS",
|
jaroslav@68
|
1519 |
"MISCELLANEOUSSYMBOLSANDARROWS");
|
jaroslav@68
|
1520 |
|
jaroslav@68
|
1521 |
/**
|
jaroslav@68
|
1522 |
* Constant for the "Katakana Phonetic Extensions" Unicode character
|
jaroslav@68
|
1523 |
* block.
|
jaroslav@68
|
1524 |
* @since 1.5
|
jaroslav@68
|
1525 |
*/
|
jaroslav@68
|
1526 |
public static final UnicodeBlock KATAKANA_PHONETIC_EXTENSIONS =
|
jaroslav@68
|
1527 |
new UnicodeBlock("KATAKANA_PHONETIC_EXTENSIONS",
|
jaroslav@68
|
1528 |
"KATAKANA PHONETIC EXTENSIONS",
|
jaroslav@68
|
1529 |
"KATAKANAPHONETICEXTENSIONS");
|
jaroslav@68
|
1530 |
|
jaroslav@68
|
1531 |
/**
|
jaroslav@68
|
1532 |
* Constant for the "Yijing Hexagram Symbols" Unicode character block.
|
jaroslav@68
|
1533 |
* @since 1.5
|
jaroslav@68
|
1534 |
*/
|
jaroslav@68
|
1535 |
public static final UnicodeBlock YIJING_HEXAGRAM_SYMBOLS =
|
jaroslav@68
|
1536 |
new UnicodeBlock("YIJING_HEXAGRAM_SYMBOLS",
|
jaroslav@68
|
1537 |
"YIJING HEXAGRAM SYMBOLS",
|
jaroslav@68
|
1538 |
"YIJINGHEXAGRAMSYMBOLS");
|
jaroslav@68
|
1539 |
|
jaroslav@68
|
1540 |
/**
|
jaroslav@68
|
1541 |
* Constant for the "Variation Selectors" Unicode character block.
|
jaroslav@68
|
1542 |
* @since 1.5
|
jaroslav@68
|
1543 |
*/
|
jaroslav@68
|
1544 |
public static final UnicodeBlock VARIATION_SELECTORS =
|
jaroslav@68
|
1545 |
new UnicodeBlock("VARIATION_SELECTORS",
|
jaroslav@68
|
1546 |
"VARIATION SELECTORS",
|
jaroslav@68
|
1547 |
"VARIATIONSELECTORS");
|
jaroslav@68
|
1548 |
|
jaroslav@68
|
1549 |
/**
|
jaroslav@68
|
1550 |
* Constant for the "Linear B Syllabary" Unicode character block.
|
jaroslav@68
|
1551 |
* @since 1.5
|
jaroslav@68
|
1552 |
*/
|
jaroslav@68
|
1553 |
public static final UnicodeBlock LINEAR_B_SYLLABARY =
|
jaroslav@68
|
1554 |
new UnicodeBlock("LINEAR_B_SYLLABARY",
|
jaroslav@68
|
1555 |
"LINEAR B SYLLABARY",
|
jaroslav@68
|
1556 |
"LINEARBSYLLABARY");
|
jaroslav@68
|
1557 |
|
jaroslav@68
|
1558 |
/**
|
jaroslav@68
|
1559 |
* Constant for the "Linear B Ideograms" Unicode character block.
|
jaroslav@68
|
1560 |
* @since 1.5
|
jaroslav@68
|
1561 |
*/
|
jaroslav@68
|
1562 |
public static final UnicodeBlock LINEAR_B_IDEOGRAMS =
|
jaroslav@68
|
1563 |
new UnicodeBlock("LINEAR_B_IDEOGRAMS",
|
jaroslav@68
|
1564 |
"LINEAR B IDEOGRAMS",
|
jaroslav@68
|
1565 |
"LINEARBIDEOGRAMS");
|
jaroslav@68
|
1566 |
|
jaroslav@68
|
1567 |
/**
|
jaroslav@68
|
1568 |
* Constant for the "Aegean Numbers" Unicode character block.
|
jaroslav@68
|
1569 |
* @since 1.5
|
jaroslav@68
|
1570 |
*/
|
jaroslav@68
|
1571 |
public static final UnicodeBlock AEGEAN_NUMBERS =
|
jaroslav@68
|
1572 |
new UnicodeBlock("AEGEAN_NUMBERS",
|
jaroslav@68
|
1573 |
"AEGEAN NUMBERS",
|
jaroslav@68
|
1574 |
"AEGEANNUMBERS");
|
jaroslav@68
|
1575 |
|
jaroslav@68
|
1576 |
/**
|
jaroslav@68
|
1577 |
* Constant for the "Old Italic" Unicode character block.
|
jaroslav@68
|
1578 |
* @since 1.5
|
jaroslav@68
|
1579 |
*/
|
jaroslav@68
|
1580 |
public static final UnicodeBlock OLD_ITALIC =
|
jaroslav@68
|
1581 |
new UnicodeBlock("OLD_ITALIC",
|
jaroslav@68
|
1582 |
"OLD ITALIC",
|
jaroslav@68
|
1583 |
"OLDITALIC");
|
jaroslav@68
|
1584 |
|
jaroslav@68
|
1585 |
/**
|
jaroslav@68
|
1586 |
* Constant for the "Gothic" Unicode character block.
|
jaroslav@68
|
1587 |
* @since 1.5
|
jaroslav@68
|
1588 |
*/
|
jaroslav@68
|
1589 |
public static final UnicodeBlock GOTHIC =
|
jaroslav@68
|
1590 |
new UnicodeBlock("GOTHIC");
|
jaroslav@68
|
1591 |
|
jaroslav@68
|
1592 |
/**
|
jaroslav@68
|
1593 |
* Constant for the "Ugaritic" Unicode character block.
|
jaroslav@68
|
1594 |
* @since 1.5
|
jaroslav@68
|
1595 |
*/
|
jaroslav@68
|
1596 |
public static final UnicodeBlock UGARITIC =
|
jaroslav@68
|
1597 |
new UnicodeBlock("UGARITIC");
|
jaroslav@68
|
1598 |
|
jaroslav@68
|
1599 |
/**
|
jaroslav@68
|
1600 |
* Constant for the "Deseret" Unicode character block.
|
jaroslav@68
|
1601 |
* @since 1.5
|
jaroslav@68
|
1602 |
*/
|
jaroslav@68
|
1603 |
public static final UnicodeBlock DESERET =
|
jaroslav@68
|
1604 |
new UnicodeBlock("DESERET");
|
jaroslav@68
|
1605 |
|
jaroslav@68
|
1606 |
/**
|
jaroslav@68
|
1607 |
* Constant for the "Shavian" Unicode character block.
|
jaroslav@68
|
1608 |
* @since 1.5
|
jaroslav@68
|
1609 |
*/
|
jaroslav@68
|
1610 |
public static final UnicodeBlock SHAVIAN =
|
jaroslav@68
|
1611 |
new UnicodeBlock("SHAVIAN");
|
jaroslav@68
|
1612 |
|
jaroslav@68
|
1613 |
/**
|
jaroslav@68
|
1614 |
* Constant for the "Osmanya" Unicode character block.
|
jaroslav@68
|
1615 |
* @since 1.5
|
jaroslav@68
|
1616 |
*/
|
jaroslav@68
|
1617 |
public static final UnicodeBlock OSMANYA =
|
jaroslav@68
|
1618 |
new UnicodeBlock("OSMANYA");
|
jaroslav@68
|
1619 |
|
jaroslav@68
|
1620 |
/**
|
jaroslav@68
|
1621 |
* Constant for the "Cypriot Syllabary" Unicode character block.
|
jaroslav@68
|
1622 |
* @since 1.5
|
jaroslav@68
|
1623 |
*/
|
jaroslav@68
|
1624 |
public static final UnicodeBlock CYPRIOT_SYLLABARY =
|
jaroslav@68
|
1625 |
new UnicodeBlock("CYPRIOT_SYLLABARY",
|
jaroslav@68
|
1626 |
"CYPRIOT SYLLABARY",
|
jaroslav@68
|
1627 |
"CYPRIOTSYLLABARY");
|
jaroslav@68
|
1628 |
|
jaroslav@68
|
1629 |
/**
|
jaroslav@68
|
1630 |
* Constant for the "Byzantine Musical Symbols" Unicode character block.
|
jaroslav@68
|
1631 |
* @since 1.5
|
jaroslav@68
|
1632 |
*/
|
jaroslav@68
|
1633 |
public static final UnicodeBlock BYZANTINE_MUSICAL_SYMBOLS =
|
jaroslav@68
|
1634 |
new UnicodeBlock("BYZANTINE_MUSICAL_SYMBOLS",
|
jaroslav@68
|
1635 |
"BYZANTINE MUSICAL SYMBOLS",
|
jaroslav@68
|
1636 |
"BYZANTINEMUSICALSYMBOLS");
|
jaroslav@68
|
1637 |
|
jaroslav@68
|
1638 |
/**
|
jaroslav@68
|
1639 |
* Constant for the "Musical Symbols" Unicode character block.
|
jaroslav@68
|
1640 |
* @since 1.5
|
jaroslav@68
|
1641 |
*/
|
jaroslav@68
|
1642 |
public static final UnicodeBlock MUSICAL_SYMBOLS =
|
jaroslav@68
|
1643 |
new UnicodeBlock("MUSICAL_SYMBOLS",
|
jaroslav@68
|
1644 |
"MUSICAL SYMBOLS",
|
jaroslav@68
|
1645 |
"MUSICALSYMBOLS");
|
jaroslav@68
|
1646 |
|
jaroslav@68
|
1647 |
/**
|
jaroslav@68
|
1648 |
* Constant for the "Tai Xuan Jing Symbols" Unicode character block.
|
jaroslav@68
|
1649 |
* @since 1.5
|
jaroslav@68
|
1650 |
*/
|
jaroslav@68
|
1651 |
public static final UnicodeBlock TAI_XUAN_JING_SYMBOLS =
|
jaroslav@68
|
1652 |
new UnicodeBlock("TAI_XUAN_JING_SYMBOLS",
|
jaroslav@68
|
1653 |
"TAI XUAN JING SYMBOLS",
|
jaroslav@68
|
1654 |
"TAIXUANJINGSYMBOLS");
|
jaroslav@68
|
1655 |
|
jaroslav@68
|
1656 |
/**
|
jaroslav@68
|
1657 |
* Constant for the "Mathematical Alphanumeric Symbols" Unicode
|
jaroslav@68
|
1658 |
* character block.
|
jaroslav@68
|
1659 |
* @since 1.5
|
jaroslav@68
|
1660 |
*/
|
jaroslav@68
|
1661 |
public static final UnicodeBlock MATHEMATICAL_ALPHANUMERIC_SYMBOLS =
|
jaroslav@68
|
1662 |
new UnicodeBlock("MATHEMATICAL_ALPHANUMERIC_SYMBOLS",
|
jaroslav@68
|
1663 |
"MATHEMATICAL ALPHANUMERIC SYMBOLS",
|
jaroslav@68
|
1664 |
"MATHEMATICALALPHANUMERICSYMBOLS");
|
jaroslav@68
|
1665 |
|
jaroslav@68
|
1666 |
/**
|
jaroslav@68
|
1667 |
* Constant for the "CJK Unified Ideographs Extension B" Unicode
|
jaroslav@68
|
1668 |
* character block.
|
jaroslav@68
|
1669 |
* @since 1.5
|
jaroslav@68
|
1670 |
*/
|
jaroslav@68
|
1671 |
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B =
|
jaroslav@68
|
1672 |
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B",
|
jaroslav@68
|
1673 |
"CJK UNIFIED IDEOGRAPHS EXTENSION B",
|
jaroslav@68
|
1674 |
"CJKUNIFIEDIDEOGRAPHSEXTENSIONB");
|
jaroslav@68
|
1675 |
|
jaroslav@68
|
1676 |
/**
|
jaroslav@68
|
1677 |
* Constant for the "CJK Compatibility Ideographs Supplement" Unicode character block.
|
jaroslav@68
|
1678 |
* @since 1.5
|
jaroslav@68
|
1679 |
*/
|
jaroslav@68
|
1680 |
public static final UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT =
|
jaroslav@68
|
1681 |
new UnicodeBlock("CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT",
|
jaroslav@68
|
1682 |
"CJK COMPATIBILITY IDEOGRAPHS SUPPLEMENT",
|
jaroslav@68
|
1683 |
"CJKCOMPATIBILITYIDEOGRAPHSSUPPLEMENT");
|
jaroslav@68
|
1684 |
|
jaroslav@68
|
1685 |
/**
|
jaroslav@68
|
1686 |
* Constant for the "Tags" Unicode character block.
|
jaroslav@68
|
1687 |
* @since 1.5
|
jaroslav@68
|
1688 |
*/
|
jaroslav@68
|
1689 |
public static final UnicodeBlock TAGS =
|
jaroslav@68
|
1690 |
new UnicodeBlock("TAGS");
|
jaroslav@68
|
1691 |
|
jaroslav@68
|
1692 |
/**
|
jaroslav@68
|
1693 |
* Constant for the "Variation Selectors Supplement" Unicode character
|
jaroslav@68
|
1694 |
* block.
|
jaroslav@68
|
1695 |
* @since 1.5
|
jaroslav@68
|
1696 |
*/
|
jaroslav@68
|
1697 |
public static final UnicodeBlock VARIATION_SELECTORS_SUPPLEMENT =
|
jaroslav@68
|
1698 |
new UnicodeBlock("VARIATION_SELECTORS_SUPPLEMENT",
|
jaroslav@68
|
1699 |
"VARIATION SELECTORS SUPPLEMENT",
|
jaroslav@68
|
1700 |
"VARIATIONSELECTORSSUPPLEMENT");
|
jaroslav@68
|
1701 |
|
jaroslav@68
|
1702 |
/**
|
jaroslav@68
|
1703 |
* Constant for the "Supplementary Private Use Area-A" Unicode character
|
jaroslav@68
|
1704 |
* block.
|
jaroslav@68
|
1705 |
* @since 1.5
|
jaroslav@68
|
1706 |
*/
|
jaroslav@68
|
1707 |
public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_A =
|
jaroslav@68
|
1708 |
new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_A",
|
jaroslav@68
|
1709 |
"SUPPLEMENTARY PRIVATE USE AREA-A",
|
jaroslav@68
|
1710 |
"SUPPLEMENTARYPRIVATEUSEAREA-A");
|
jaroslav@68
|
1711 |
|
jaroslav@68
|
1712 |
/**
|
jaroslav@68
|
1713 |
* Constant for the "Supplementary Private Use Area-B" Unicode character
|
jaroslav@68
|
1714 |
* block.
|
jaroslav@68
|
1715 |
* @since 1.5
|
jaroslav@68
|
1716 |
*/
|
jaroslav@68
|
1717 |
public static final UnicodeBlock SUPPLEMENTARY_PRIVATE_USE_AREA_B =
|
jaroslav@68
|
1718 |
new UnicodeBlock("SUPPLEMENTARY_PRIVATE_USE_AREA_B",
|
jaroslav@68
|
1719 |
"SUPPLEMENTARY PRIVATE USE AREA-B",
|
jaroslav@68
|
1720 |
"SUPPLEMENTARYPRIVATEUSEAREA-B");
|
jaroslav@68
|
1721 |
|
jaroslav@68
|
1722 |
/**
|
jaroslav@68
|
1723 |
* Constant for the "High Surrogates" Unicode character block.
|
jaroslav@68
|
1724 |
* This block represents codepoint values in the high surrogate
|
jaroslav@68
|
1725 |
* range: U+D800 through U+DB7F
|
jaroslav@68
|
1726 |
*
|
jaroslav@68
|
1727 |
* @since 1.5
|
jaroslav@68
|
1728 |
*/
|
jaroslav@68
|
1729 |
public static final UnicodeBlock HIGH_SURROGATES =
|
jaroslav@68
|
1730 |
new UnicodeBlock("HIGH_SURROGATES",
|
jaroslav@68
|
1731 |
"HIGH SURROGATES",
|
jaroslav@68
|
1732 |
"HIGHSURROGATES");
|
jaroslav@68
|
1733 |
|
jaroslav@68
|
1734 |
/**
|
jaroslav@68
|
1735 |
* Constant for the "High Private Use Surrogates" Unicode character
|
jaroslav@68
|
1736 |
* block.
|
jaroslav@68
|
1737 |
* This block represents codepoint values in the private use high
|
jaroslav@68
|
1738 |
* surrogate range: U+DB80 through U+DBFF
|
jaroslav@68
|
1739 |
*
|
jaroslav@68
|
1740 |
* @since 1.5
|
jaroslav@68
|
1741 |
*/
|
jaroslav@68
|
1742 |
public static final UnicodeBlock HIGH_PRIVATE_USE_SURROGATES =
|
jaroslav@68
|
1743 |
new UnicodeBlock("HIGH_PRIVATE_USE_SURROGATES",
|
jaroslav@68
|
1744 |
"HIGH PRIVATE USE SURROGATES",
|
jaroslav@68
|
1745 |
"HIGHPRIVATEUSESURROGATES");
|
jaroslav@68
|
1746 |
|
jaroslav@68
|
1747 |
/**
|
jaroslav@68
|
1748 |
* Constant for the "Low Surrogates" Unicode character block.
|
jaroslav@68
|
1749 |
* This block represents codepoint values in the low surrogate
|
jaroslav@68
|
1750 |
* range: U+DC00 through U+DFFF
|
jaroslav@68
|
1751 |
*
|
jaroslav@68
|
1752 |
* @since 1.5
|
jaroslav@68
|
1753 |
*/
|
jaroslav@68
|
1754 |
public static final UnicodeBlock LOW_SURROGATES =
|
jaroslav@68
|
1755 |
new UnicodeBlock("LOW_SURROGATES",
|
jaroslav@68
|
1756 |
"LOW SURROGATES",
|
jaroslav@68
|
1757 |
"LOWSURROGATES");
|
jaroslav@68
|
1758 |
|
jaroslav@68
|
1759 |
/**
|
jaroslav@68
|
1760 |
* Constant for the "Arabic Supplement" Unicode character block.
|
jaroslav@68
|
1761 |
* @since 1.7
|
jaroslav@68
|
1762 |
*/
|
jaroslav@68
|
1763 |
public static final UnicodeBlock ARABIC_SUPPLEMENT =
|
jaroslav@68
|
1764 |
new UnicodeBlock("ARABIC_SUPPLEMENT",
|
jaroslav@68
|
1765 |
"ARABIC SUPPLEMENT",
|
jaroslav@68
|
1766 |
"ARABICSUPPLEMENT");
|
jaroslav@68
|
1767 |
|
jaroslav@68
|
1768 |
/**
|
jaroslav@68
|
1769 |
* Constant for the "NKo" Unicode character block.
|
jaroslav@68
|
1770 |
* @since 1.7
|
jaroslav@68
|
1771 |
*/
|
jaroslav@68
|
1772 |
public static final UnicodeBlock NKO =
|
jaroslav@68
|
1773 |
new UnicodeBlock("NKO");
|
jaroslav@68
|
1774 |
|
jaroslav@68
|
1775 |
/**
|
jaroslav@68
|
1776 |
* Constant for the "Samaritan" Unicode character block.
|
jaroslav@68
|
1777 |
* @since 1.7
|
jaroslav@68
|
1778 |
*/
|
jaroslav@68
|
1779 |
public static final UnicodeBlock SAMARITAN =
|
jaroslav@68
|
1780 |
new UnicodeBlock("SAMARITAN");
|
jaroslav@68
|
1781 |
|
jaroslav@68
|
1782 |
/**
|
jaroslav@68
|
1783 |
* Constant for the "Mandaic" Unicode character block.
|
jaroslav@68
|
1784 |
* @since 1.7
|
jaroslav@68
|
1785 |
*/
|
jaroslav@68
|
1786 |
public static final UnicodeBlock MANDAIC =
|
jaroslav@68
|
1787 |
new UnicodeBlock("MANDAIC");
|
jaroslav@68
|
1788 |
|
jaroslav@68
|
1789 |
/**
|
jaroslav@68
|
1790 |
* Constant for the "Ethiopic Supplement" Unicode character block.
|
jaroslav@68
|
1791 |
* @since 1.7
|
jaroslav@68
|
1792 |
*/
|
jaroslav@68
|
1793 |
public static final UnicodeBlock ETHIOPIC_SUPPLEMENT =
|
jaroslav@68
|
1794 |
new UnicodeBlock("ETHIOPIC_SUPPLEMENT",
|
jaroslav@68
|
1795 |
"ETHIOPIC SUPPLEMENT",
|
jaroslav@68
|
1796 |
"ETHIOPICSUPPLEMENT");
|
jaroslav@68
|
1797 |
|
jaroslav@68
|
1798 |
/**
|
jaroslav@68
|
1799 |
* Constant for the "Unified Canadian Aboriginal Syllabics Extended"
|
jaroslav@68
|
1800 |
* Unicode character block.
|
jaroslav@68
|
1801 |
* @since 1.7
|
jaroslav@68
|
1802 |
*/
|
jaroslav@68
|
1803 |
public static final UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED =
|
jaroslav@68
|
1804 |
new UnicodeBlock("UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED",
|
jaroslav@68
|
1805 |
"UNIFIED CANADIAN ABORIGINAL SYLLABICS EXTENDED",
|
jaroslav@68
|
1806 |
"UNIFIEDCANADIANABORIGINALSYLLABICSEXTENDED");
|
jaroslav@68
|
1807 |
|
jaroslav@68
|
1808 |
/**
|
jaroslav@68
|
1809 |
* Constant for the "New Tai Lue" Unicode character block.
|
jaroslav@68
|
1810 |
* @since 1.7
|
jaroslav@68
|
1811 |
*/
|
jaroslav@68
|
1812 |
public static final UnicodeBlock NEW_TAI_LUE =
|
jaroslav@68
|
1813 |
new UnicodeBlock("NEW_TAI_LUE",
|
jaroslav@68
|
1814 |
"NEW TAI LUE",
|
jaroslav@68
|
1815 |
"NEWTAILUE");
|
jaroslav@68
|
1816 |
|
jaroslav@68
|
1817 |
/**
|
jaroslav@68
|
1818 |
* Constant for the "Buginese" Unicode character block.
|
jaroslav@68
|
1819 |
* @since 1.7
|
jaroslav@68
|
1820 |
*/
|
jaroslav@68
|
1821 |
public static final UnicodeBlock BUGINESE =
|
jaroslav@68
|
1822 |
new UnicodeBlock("BUGINESE");
|
jaroslav@68
|
1823 |
|
jaroslav@68
|
1824 |
/**
|
jaroslav@68
|
1825 |
* Constant for the "Tai Tham" Unicode character block.
|
jaroslav@68
|
1826 |
* @since 1.7
|
jaroslav@68
|
1827 |
*/
|
jaroslav@68
|
1828 |
public static final UnicodeBlock TAI_THAM =
|
jaroslav@68
|
1829 |
new UnicodeBlock("TAI_THAM",
|
jaroslav@68
|
1830 |
"TAI THAM",
|
jaroslav@68
|
1831 |
"TAITHAM");
|
jaroslav@68
|
1832 |
|
jaroslav@68
|
1833 |
/**
|
jaroslav@68
|
1834 |
* Constant for the "Balinese" Unicode character block.
|
jaroslav@68
|
1835 |
* @since 1.7
|
jaroslav@68
|
1836 |
*/
|
jaroslav@68
|
1837 |
public static final UnicodeBlock BALINESE =
|
jaroslav@68
|
1838 |
new UnicodeBlock("BALINESE");
|
jaroslav@68
|
1839 |
|
jaroslav@68
|
1840 |
/**
|
jaroslav@68
|
1841 |
* Constant for the "Sundanese" Unicode character block.
|
jaroslav@68
|
1842 |
* @since 1.7
|
jaroslav@68
|
1843 |
*/
|
jaroslav@68
|
1844 |
public static final UnicodeBlock SUNDANESE =
|
jaroslav@68
|
1845 |
new UnicodeBlock("SUNDANESE");
|
jaroslav@68
|
1846 |
|
jaroslav@68
|
1847 |
/**
|
jaroslav@68
|
1848 |
* Constant for the "Batak" Unicode character block.
|
jaroslav@68
|
1849 |
* @since 1.7
|
jaroslav@68
|
1850 |
*/
|
jaroslav@68
|
1851 |
public static final UnicodeBlock BATAK =
|
jaroslav@68
|
1852 |
new UnicodeBlock("BATAK");
|
jaroslav@68
|
1853 |
|
jaroslav@68
|
1854 |
/**
|
jaroslav@68
|
1855 |
* Constant for the "Lepcha" Unicode character block.
|
jaroslav@68
|
1856 |
* @since 1.7
|
jaroslav@68
|
1857 |
*/
|
jaroslav@68
|
1858 |
public static final UnicodeBlock LEPCHA =
|
jaroslav@68
|
1859 |
new UnicodeBlock("LEPCHA");
|
jaroslav@68
|
1860 |
|
jaroslav@68
|
1861 |
/**
|
jaroslav@68
|
1862 |
* Constant for the "Ol Chiki" Unicode character block.
|
jaroslav@68
|
1863 |
* @since 1.7
|
jaroslav@68
|
1864 |
*/
|
jaroslav@68
|
1865 |
public static final UnicodeBlock OL_CHIKI =
|
jaroslav@68
|
1866 |
new UnicodeBlock("OL_CHIKI",
|
jaroslav@68
|
1867 |
"OL CHIKI",
|
jaroslav@68
|
1868 |
"OLCHIKI");
|
jaroslav@68
|
1869 |
|
jaroslav@68
|
1870 |
/**
|
jaroslav@68
|
1871 |
* Constant for the "Vedic Extensions" Unicode character block.
|
jaroslav@68
|
1872 |
* @since 1.7
|
jaroslav@68
|
1873 |
*/
|
jaroslav@68
|
1874 |
public static final UnicodeBlock VEDIC_EXTENSIONS =
|
jaroslav@68
|
1875 |
new UnicodeBlock("VEDIC_EXTENSIONS",
|
jaroslav@68
|
1876 |
"VEDIC EXTENSIONS",
|
jaroslav@68
|
1877 |
"VEDICEXTENSIONS");
|
jaroslav@68
|
1878 |
|
jaroslav@68
|
1879 |
/**
|
jaroslav@68
|
1880 |
* Constant for the "Phonetic Extensions Supplement" Unicode character
|
jaroslav@68
|
1881 |
* block.
|
jaroslav@68
|
1882 |
* @since 1.7
|
jaroslav@68
|
1883 |
*/
|
jaroslav@68
|
1884 |
public static final UnicodeBlock PHONETIC_EXTENSIONS_SUPPLEMENT =
|
jaroslav@68
|
1885 |
new UnicodeBlock("PHONETIC_EXTENSIONS_SUPPLEMENT",
|
jaroslav@68
|
1886 |
"PHONETIC EXTENSIONS SUPPLEMENT",
|
jaroslav@68
|
1887 |
"PHONETICEXTENSIONSSUPPLEMENT");
|
jaroslav@68
|
1888 |
|
jaroslav@68
|
1889 |
/**
|
jaroslav@68
|
1890 |
* Constant for the "Combining Diacritical Marks Supplement" Unicode
|
jaroslav@68
|
1891 |
* character block.
|
jaroslav@68
|
1892 |
* @since 1.7
|
jaroslav@68
|
1893 |
*/
|
jaroslav@68
|
1894 |
public static final UnicodeBlock COMBINING_DIACRITICAL_MARKS_SUPPLEMENT =
|
jaroslav@68
|
1895 |
new UnicodeBlock("COMBINING_DIACRITICAL_MARKS_SUPPLEMENT",
|
jaroslav@68
|
1896 |
"COMBINING DIACRITICAL MARKS SUPPLEMENT",
|
jaroslav@68
|
1897 |
"COMBININGDIACRITICALMARKSSUPPLEMENT");
|
jaroslav@68
|
1898 |
|
jaroslav@68
|
1899 |
/**
|
jaroslav@68
|
1900 |
* Constant for the "Glagolitic" Unicode character block.
|
jaroslav@68
|
1901 |
* @since 1.7
|
jaroslav@68
|
1902 |
*/
|
jaroslav@68
|
1903 |
public static final UnicodeBlock GLAGOLITIC =
|
jaroslav@68
|
1904 |
new UnicodeBlock("GLAGOLITIC");
|
jaroslav@68
|
1905 |
|
jaroslav@68
|
1906 |
/**
|
jaroslav@68
|
1907 |
* Constant for the "Latin Extended-C" Unicode character block.
|
jaroslav@68
|
1908 |
* @since 1.7
|
jaroslav@68
|
1909 |
*/
|
jaroslav@68
|
1910 |
public static final UnicodeBlock LATIN_EXTENDED_C =
|
jaroslav@68
|
1911 |
new UnicodeBlock("LATIN_EXTENDED_C",
|
jaroslav@68
|
1912 |
"LATIN EXTENDED-C",
|
jaroslav@68
|
1913 |
"LATINEXTENDED-C");
|
jaroslav@68
|
1914 |
|
jaroslav@68
|
1915 |
/**
|
jaroslav@68
|
1916 |
* Constant for the "Coptic" Unicode character block.
|
jaroslav@68
|
1917 |
* @since 1.7
|
jaroslav@68
|
1918 |
*/
|
jaroslav@68
|
1919 |
public static final UnicodeBlock COPTIC =
|
jaroslav@68
|
1920 |
new UnicodeBlock("COPTIC");
|
jaroslav@68
|
1921 |
|
jaroslav@68
|
1922 |
/**
|
jaroslav@68
|
1923 |
* Constant for the "Georgian Supplement" Unicode character block.
|
jaroslav@68
|
1924 |
* @since 1.7
|
jaroslav@68
|
1925 |
*/
|
jaroslav@68
|
1926 |
public static final UnicodeBlock GEORGIAN_SUPPLEMENT =
|
jaroslav@68
|
1927 |
new UnicodeBlock("GEORGIAN_SUPPLEMENT",
|
jaroslav@68
|
1928 |
"GEORGIAN SUPPLEMENT",
|
jaroslav@68
|
1929 |
"GEORGIANSUPPLEMENT");
|
jaroslav@68
|
1930 |
|
jaroslav@68
|
1931 |
/**
|
jaroslav@68
|
1932 |
* Constant for the "Tifinagh" Unicode character block.
|
jaroslav@68
|
1933 |
* @since 1.7
|
jaroslav@68
|
1934 |
*/
|
jaroslav@68
|
1935 |
public static final UnicodeBlock TIFINAGH =
|
jaroslav@68
|
1936 |
new UnicodeBlock("TIFINAGH");
|
jaroslav@68
|
1937 |
|
jaroslav@68
|
1938 |
/**
|
jaroslav@68
|
1939 |
* Constant for the "Ethiopic Extended" Unicode character block.
|
jaroslav@68
|
1940 |
* @since 1.7
|
jaroslav@68
|
1941 |
*/
|
jaroslav@68
|
1942 |
public static final UnicodeBlock ETHIOPIC_EXTENDED =
|
jaroslav@68
|
1943 |
new UnicodeBlock("ETHIOPIC_EXTENDED",
|
jaroslav@68
|
1944 |
"ETHIOPIC EXTENDED",
|
jaroslav@68
|
1945 |
"ETHIOPICEXTENDED");
|
jaroslav@68
|
1946 |
|
jaroslav@68
|
1947 |
/**
|
jaroslav@68
|
1948 |
* Constant for the "Cyrillic Extended-A" Unicode character block.
|
jaroslav@68
|
1949 |
* @since 1.7
|
jaroslav@68
|
1950 |
*/
|
jaroslav@68
|
1951 |
public static final UnicodeBlock CYRILLIC_EXTENDED_A =
|
jaroslav@68
|
1952 |
new UnicodeBlock("CYRILLIC_EXTENDED_A",
|
jaroslav@68
|
1953 |
"CYRILLIC EXTENDED-A",
|
jaroslav@68
|
1954 |
"CYRILLICEXTENDED-A");
|
jaroslav@68
|
1955 |
|
jaroslav@68
|
1956 |
/**
|
jaroslav@68
|
1957 |
* Constant for the "Supplemental Punctuation" Unicode character block.
|
jaroslav@68
|
1958 |
* @since 1.7
|
jaroslav@68
|
1959 |
*/
|
jaroslav@68
|
1960 |
public static final UnicodeBlock SUPPLEMENTAL_PUNCTUATION =
|
jaroslav@68
|
1961 |
new UnicodeBlock("SUPPLEMENTAL_PUNCTUATION",
|
jaroslav@68
|
1962 |
"SUPPLEMENTAL PUNCTUATION",
|
jaroslav@68
|
1963 |
"SUPPLEMENTALPUNCTUATION");
|
jaroslav@68
|
1964 |
|
jaroslav@68
|
1965 |
/**
|
jaroslav@68
|
1966 |
* Constant for the "CJK Strokes" Unicode character block.
|
jaroslav@68
|
1967 |
* @since 1.7
|
jaroslav@68
|
1968 |
*/
|
jaroslav@68
|
1969 |
public static final UnicodeBlock CJK_STROKES =
|
jaroslav@68
|
1970 |
new UnicodeBlock("CJK_STROKES",
|
jaroslav@68
|
1971 |
"CJK STROKES",
|
jaroslav@68
|
1972 |
"CJKSTROKES");
|
jaroslav@68
|
1973 |
|
jaroslav@68
|
1974 |
/**
|
jaroslav@68
|
1975 |
* Constant for the "Lisu" Unicode character block.
|
jaroslav@68
|
1976 |
* @since 1.7
|
jaroslav@68
|
1977 |
*/
|
jaroslav@68
|
1978 |
public static final UnicodeBlock LISU =
|
jaroslav@68
|
1979 |
new UnicodeBlock("LISU");
|
jaroslav@68
|
1980 |
|
jaroslav@68
|
1981 |
/**
|
jaroslav@68
|
1982 |
* Constant for the "Vai" Unicode character block.
|
jaroslav@68
|
1983 |
* @since 1.7
|
jaroslav@68
|
1984 |
*/
|
jaroslav@68
|
1985 |
public static final UnicodeBlock VAI =
|
jaroslav@68
|
1986 |
new UnicodeBlock("VAI");
|
jaroslav@68
|
1987 |
|
jaroslav@68
|
1988 |
/**
|
jaroslav@68
|
1989 |
* Constant for the "Cyrillic Extended-B" Unicode character block.
|
jaroslav@68
|
1990 |
* @since 1.7
|
jaroslav@68
|
1991 |
*/
|
jaroslav@68
|
1992 |
public static final UnicodeBlock CYRILLIC_EXTENDED_B =
|
jaroslav@68
|
1993 |
new UnicodeBlock("CYRILLIC_EXTENDED_B",
|
jaroslav@68
|
1994 |
"CYRILLIC EXTENDED-B",
|
jaroslav@68
|
1995 |
"CYRILLICEXTENDED-B");
|
jaroslav@68
|
1996 |
|
jaroslav@68
|
1997 |
/**
|
jaroslav@68
|
1998 |
* Constant for the "Bamum" Unicode character block.
|
jaroslav@68
|
1999 |
* @since 1.7
|
jaroslav@68
|
2000 |
*/
|
jaroslav@68
|
2001 |
public static final UnicodeBlock BAMUM =
|
jaroslav@68
|
2002 |
new UnicodeBlock("BAMUM");
|
jaroslav@68
|
2003 |
|
jaroslav@68
|
2004 |
/**
|
jaroslav@68
|
2005 |
* Constant for the "Modifier Tone Letters" Unicode character block.
|
jaroslav@68
|
2006 |
* @since 1.7
|
jaroslav@68
|
2007 |
*/
|
jaroslav@68
|
2008 |
public static final UnicodeBlock MODIFIER_TONE_LETTERS =
|
jaroslav@68
|
2009 |
new UnicodeBlock("MODIFIER_TONE_LETTERS",
|
jaroslav@68
|
2010 |
"MODIFIER TONE LETTERS",
|
jaroslav@68
|
2011 |
"MODIFIERTONELETTERS");
|
jaroslav@68
|
2012 |
|
jaroslav@68
|
2013 |
/**
|
jaroslav@68
|
2014 |
* Constant for the "Latin Extended-D" Unicode character block.
|
jaroslav@68
|
2015 |
* @since 1.7
|
jaroslav@68
|
2016 |
*/
|
jaroslav@68
|
2017 |
public static final UnicodeBlock LATIN_EXTENDED_D =
|
jaroslav@68
|
2018 |
new UnicodeBlock("LATIN_EXTENDED_D",
|
jaroslav@68
|
2019 |
"LATIN EXTENDED-D",
|
jaroslav@68
|
2020 |
"LATINEXTENDED-D");
|
jaroslav@68
|
2021 |
|
jaroslav@68
|
2022 |
/**
|
jaroslav@68
|
2023 |
* Constant for the "Syloti Nagri" Unicode character block.
|
jaroslav@68
|
2024 |
* @since 1.7
|
jaroslav@68
|
2025 |
*/
|
jaroslav@68
|
2026 |
public static final UnicodeBlock SYLOTI_NAGRI =
|
jaroslav@68
|
2027 |
new UnicodeBlock("SYLOTI_NAGRI",
|
jaroslav@68
|
2028 |
"SYLOTI NAGRI",
|
jaroslav@68
|
2029 |
"SYLOTINAGRI");
|
jaroslav@68
|
2030 |
|
jaroslav@68
|
2031 |
/**
|
jaroslav@68
|
2032 |
* Constant for the "Common Indic Number Forms" Unicode character block.
|
jaroslav@68
|
2033 |
* @since 1.7
|
jaroslav@68
|
2034 |
*/
|
jaroslav@68
|
2035 |
public static final UnicodeBlock COMMON_INDIC_NUMBER_FORMS =
|
jaroslav@68
|
2036 |
new UnicodeBlock("COMMON_INDIC_NUMBER_FORMS",
|
jaroslav@68
|
2037 |
"COMMON INDIC NUMBER FORMS",
|
jaroslav@68
|
2038 |
"COMMONINDICNUMBERFORMS");
|
jaroslav@68
|
2039 |
|
jaroslav@68
|
2040 |
/**
|
jaroslav@68
|
2041 |
* Constant for the "Phags-pa" Unicode character block.
|
jaroslav@68
|
2042 |
* @since 1.7
|
jaroslav@68
|
2043 |
*/
|
jaroslav@68
|
2044 |
public static final UnicodeBlock PHAGS_PA =
|
jaroslav@68
|
2045 |
new UnicodeBlock("PHAGS_PA",
|
jaroslav@68
|
2046 |
"PHAGS-PA");
|
jaroslav@68
|
2047 |
|
jaroslav@68
|
2048 |
/**
|
jaroslav@68
|
2049 |
* Constant for the "Saurashtra" Unicode character block.
|
jaroslav@68
|
2050 |
* @since 1.7
|
jaroslav@68
|
2051 |
*/
|
jaroslav@68
|
2052 |
public static final UnicodeBlock SAURASHTRA =
|
jaroslav@68
|
2053 |
new UnicodeBlock("SAURASHTRA");
|
jaroslav@68
|
2054 |
|
jaroslav@68
|
2055 |
/**
|
jaroslav@68
|
2056 |
* Constant for the "Devanagari Extended" Unicode character block.
|
jaroslav@68
|
2057 |
* @since 1.7
|
jaroslav@68
|
2058 |
*/
|
jaroslav@68
|
2059 |
public static final UnicodeBlock DEVANAGARI_EXTENDED =
|
jaroslav@68
|
2060 |
new UnicodeBlock("DEVANAGARI_EXTENDED",
|
jaroslav@68
|
2061 |
"DEVANAGARI EXTENDED",
|
jaroslav@68
|
2062 |
"DEVANAGARIEXTENDED");
|
jaroslav@68
|
2063 |
|
jaroslav@68
|
2064 |
/**
|
jaroslav@68
|
2065 |
* Constant for the "Kayah Li" Unicode character block.
|
jaroslav@68
|
2066 |
* @since 1.7
|
jaroslav@68
|
2067 |
*/
|
jaroslav@68
|
2068 |
public static final UnicodeBlock KAYAH_LI =
|
jaroslav@68
|
2069 |
new UnicodeBlock("KAYAH_LI",
|
jaroslav@68
|
2070 |
"KAYAH LI",
|
jaroslav@68
|
2071 |
"KAYAHLI");
|
jaroslav@68
|
2072 |
|
jaroslav@68
|
2073 |
/**
|
jaroslav@68
|
2074 |
* Constant for the "Rejang" Unicode character block.
|
jaroslav@68
|
2075 |
* @since 1.7
|
jaroslav@68
|
2076 |
*/
|
jaroslav@68
|
2077 |
public static final UnicodeBlock REJANG =
|
jaroslav@68
|
2078 |
new UnicodeBlock("REJANG");
|
jaroslav@68
|
2079 |
|
jaroslav@68
|
2080 |
/**
|
jaroslav@68
|
2081 |
* Constant for the "Hangul Jamo Extended-A" Unicode character block.
|
jaroslav@68
|
2082 |
* @since 1.7
|
jaroslav@68
|
2083 |
*/
|
jaroslav@68
|
2084 |
public static final UnicodeBlock HANGUL_JAMO_EXTENDED_A =
|
jaroslav@68
|
2085 |
new UnicodeBlock("HANGUL_JAMO_EXTENDED_A",
|
jaroslav@68
|
2086 |
"HANGUL JAMO EXTENDED-A",
|
jaroslav@68
|
2087 |
"HANGULJAMOEXTENDED-A");
|
jaroslav@68
|
2088 |
|
jaroslav@68
|
2089 |
/**
|
jaroslav@68
|
2090 |
* Constant for the "Javanese" Unicode character block.
|
jaroslav@68
|
2091 |
* @since 1.7
|
jaroslav@68
|
2092 |
*/
|
jaroslav@68
|
2093 |
public static final UnicodeBlock JAVANESE =
|
jaroslav@68
|
2094 |
new UnicodeBlock("JAVANESE");
|
jaroslav@68
|
2095 |
|
jaroslav@68
|
2096 |
/**
|
jaroslav@68
|
2097 |
* Constant for the "Cham" Unicode character block.
|
jaroslav@68
|
2098 |
* @since 1.7
|
jaroslav@68
|
2099 |
*/
|
jaroslav@68
|
2100 |
public static final UnicodeBlock CHAM =
|
jaroslav@68
|
2101 |
new UnicodeBlock("CHAM");
|
jaroslav@68
|
2102 |
|
jaroslav@68
|
2103 |
/**
|
jaroslav@68
|
2104 |
* Constant for the "Myanmar Extended-A" Unicode character block.
|
jaroslav@68
|
2105 |
* @since 1.7
|
jaroslav@68
|
2106 |
*/
|
jaroslav@68
|
2107 |
public static final UnicodeBlock MYANMAR_EXTENDED_A =
|
jaroslav@68
|
2108 |
new UnicodeBlock("MYANMAR_EXTENDED_A",
|
jaroslav@68
|
2109 |
"MYANMAR EXTENDED-A",
|
jaroslav@68
|
2110 |
"MYANMAREXTENDED-A");
|
jaroslav@68
|
2111 |
|
jaroslav@68
|
2112 |
/**
|
jaroslav@68
|
2113 |
* Constant for the "Tai Viet" Unicode character block.
|
jaroslav@68
|
2114 |
* @since 1.7
|
jaroslav@68
|
2115 |
*/
|
jaroslav@68
|
2116 |
public static final UnicodeBlock TAI_VIET =
|
jaroslav@68
|
2117 |
new UnicodeBlock("TAI_VIET",
|
jaroslav@68
|
2118 |
"TAI VIET",
|
jaroslav@68
|
2119 |
"TAIVIET");
|
jaroslav@68
|
2120 |
|
jaroslav@68
|
2121 |
/**
|
jaroslav@68
|
2122 |
* Constant for the "Ethiopic Extended-A" Unicode character block.
|
jaroslav@68
|
2123 |
* @since 1.7
|
jaroslav@68
|
2124 |
*/
|
jaroslav@68
|
2125 |
public static final UnicodeBlock ETHIOPIC_EXTENDED_A =
|
jaroslav@68
|
2126 |
new UnicodeBlock("ETHIOPIC_EXTENDED_A",
|
jaroslav@68
|
2127 |
"ETHIOPIC EXTENDED-A",
|
jaroslav@68
|
2128 |
"ETHIOPICEXTENDED-A");
|
jaroslav@68
|
2129 |
|
jaroslav@68
|
2130 |
/**
|
jaroslav@68
|
2131 |
* Constant for the "Meetei Mayek" Unicode character block.
|
jaroslav@68
|
2132 |
* @since 1.7
|
jaroslav@68
|
2133 |
*/
|
jaroslav@68
|
2134 |
public static final UnicodeBlock MEETEI_MAYEK =
|
jaroslav@68
|
2135 |
new UnicodeBlock("MEETEI_MAYEK",
|
jaroslav@68
|
2136 |
"MEETEI MAYEK",
|
jaroslav@68
|
2137 |
"MEETEIMAYEK");
|
jaroslav@68
|
2138 |
|
jaroslav@68
|
2139 |
/**
|
jaroslav@68
|
2140 |
* Constant for the "Hangul Jamo Extended-B" Unicode character block.
|
jaroslav@68
|
2141 |
* @since 1.7
|
jaroslav@68
|
2142 |
*/
|
jaroslav@68
|
2143 |
public static final UnicodeBlock HANGUL_JAMO_EXTENDED_B =
|
jaroslav@68
|
2144 |
new UnicodeBlock("HANGUL_JAMO_EXTENDED_B",
|
jaroslav@68
|
2145 |
"HANGUL JAMO EXTENDED-B",
|
jaroslav@68
|
2146 |
"HANGULJAMOEXTENDED-B");
|
jaroslav@68
|
2147 |
|
jaroslav@68
|
2148 |
/**
|
jaroslav@68
|
2149 |
* Constant for the "Vertical Forms" Unicode character block.
|
jaroslav@68
|
2150 |
* @since 1.7
|
jaroslav@68
|
2151 |
*/
|
jaroslav@68
|
2152 |
public static final UnicodeBlock VERTICAL_FORMS =
|
jaroslav@68
|
2153 |
new UnicodeBlock("VERTICAL_FORMS",
|
jaroslav@68
|
2154 |
"VERTICAL FORMS",
|
jaroslav@68
|
2155 |
"VERTICALFORMS");
|
jaroslav@68
|
2156 |
|
jaroslav@68
|
2157 |
/**
|
jaroslav@68
|
2158 |
* Constant for the "Ancient Greek Numbers" Unicode character block.
|
jaroslav@68
|
2159 |
* @since 1.7
|
jaroslav@68
|
2160 |
*/
|
jaroslav@68
|
2161 |
public static final UnicodeBlock ANCIENT_GREEK_NUMBERS =
|
jaroslav@68
|
2162 |
new UnicodeBlock("ANCIENT_GREEK_NUMBERS",
|
jaroslav@68
|
2163 |
"ANCIENT GREEK NUMBERS",
|
jaroslav@68
|
2164 |
"ANCIENTGREEKNUMBERS");
|
jaroslav@68
|
2165 |
|
jaroslav@68
|
2166 |
/**
|
jaroslav@68
|
2167 |
* Constant for the "Ancient Symbols" Unicode character block.
|
jaroslav@68
|
2168 |
* @since 1.7
|
jaroslav@68
|
2169 |
*/
|
jaroslav@68
|
2170 |
public static final UnicodeBlock ANCIENT_SYMBOLS =
|
jaroslav@68
|
2171 |
new UnicodeBlock("ANCIENT_SYMBOLS",
|
jaroslav@68
|
2172 |
"ANCIENT SYMBOLS",
|
jaroslav@68
|
2173 |
"ANCIENTSYMBOLS");
|
jaroslav@68
|
2174 |
|
jaroslav@68
|
2175 |
/**
|
jaroslav@68
|
2176 |
* Constant for the "Phaistos Disc" Unicode character block.
|
jaroslav@68
|
2177 |
* @since 1.7
|
jaroslav@68
|
2178 |
*/
|
jaroslav@68
|
2179 |
public static final UnicodeBlock PHAISTOS_DISC =
|
jaroslav@68
|
2180 |
new UnicodeBlock("PHAISTOS_DISC",
|
jaroslav@68
|
2181 |
"PHAISTOS DISC",
|
jaroslav@68
|
2182 |
"PHAISTOSDISC");
|
jaroslav@68
|
2183 |
|
jaroslav@68
|
2184 |
/**
|
jaroslav@68
|
2185 |
* Constant for the "Lycian" Unicode character block.
|
jaroslav@68
|
2186 |
* @since 1.7
|
jaroslav@68
|
2187 |
*/
|
jaroslav@68
|
2188 |
public static final UnicodeBlock LYCIAN =
|
jaroslav@68
|
2189 |
new UnicodeBlock("LYCIAN");
|
jaroslav@68
|
2190 |
|
jaroslav@68
|
2191 |
/**
|
jaroslav@68
|
2192 |
* Constant for the "Carian" Unicode character block.
|
jaroslav@68
|
2193 |
* @since 1.7
|
jaroslav@68
|
2194 |
*/
|
jaroslav@68
|
2195 |
public static final UnicodeBlock CARIAN =
|
jaroslav@68
|
2196 |
new UnicodeBlock("CARIAN");
|
jaroslav@68
|
2197 |
|
jaroslav@68
|
2198 |
/**
|
jaroslav@68
|
2199 |
* Constant for the "Old Persian" Unicode character block.
|
jaroslav@68
|
2200 |
* @since 1.7
|
jaroslav@68
|
2201 |
*/
|
jaroslav@68
|
2202 |
public static final UnicodeBlock OLD_PERSIAN =
|
jaroslav@68
|
2203 |
new UnicodeBlock("OLD_PERSIAN",
|
jaroslav@68
|
2204 |
"OLD PERSIAN",
|
jaroslav@68
|
2205 |
"OLDPERSIAN");
|
jaroslav@68
|
2206 |
|
jaroslav@68
|
2207 |
/**
|
jaroslav@68
|
2208 |
* Constant for the "Imperial Aramaic" Unicode character block.
|
jaroslav@68
|
2209 |
* @since 1.7
|
jaroslav@68
|
2210 |
*/
|
jaroslav@68
|
2211 |
public static final UnicodeBlock IMPERIAL_ARAMAIC =
|
jaroslav@68
|
2212 |
new UnicodeBlock("IMPERIAL_ARAMAIC",
|
jaroslav@68
|
2213 |
"IMPERIAL ARAMAIC",
|
jaroslav@68
|
2214 |
"IMPERIALARAMAIC");
|
jaroslav@68
|
2215 |
|
jaroslav@68
|
2216 |
/**
|
jaroslav@68
|
2217 |
* Constant for the "Phoenician" Unicode character block.
|
jaroslav@68
|
2218 |
* @since 1.7
|
jaroslav@68
|
2219 |
*/
|
jaroslav@68
|
2220 |
public static final UnicodeBlock PHOENICIAN =
|
jaroslav@68
|
2221 |
new UnicodeBlock("PHOENICIAN");
|
jaroslav@68
|
2222 |
|
jaroslav@68
|
2223 |
/**
|
jaroslav@68
|
2224 |
* Constant for the "Lydian" Unicode character block.
|
jaroslav@68
|
2225 |
* @since 1.7
|
jaroslav@68
|
2226 |
*/
|
jaroslav@68
|
2227 |
public static final UnicodeBlock LYDIAN =
|
jaroslav@68
|
2228 |
new UnicodeBlock("LYDIAN");
|
jaroslav@68
|
2229 |
|
jaroslav@68
|
2230 |
/**
|
jaroslav@68
|
2231 |
* Constant for the "Kharoshthi" Unicode character block.
|
jaroslav@68
|
2232 |
* @since 1.7
|
jaroslav@68
|
2233 |
*/
|
jaroslav@68
|
2234 |
public static final UnicodeBlock KHAROSHTHI =
|
jaroslav@68
|
2235 |
new UnicodeBlock("KHAROSHTHI");
|
jaroslav@68
|
2236 |
|
jaroslav@68
|
2237 |
/**
|
jaroslav@68
|
2238 |
* Constant for the "Old South Arabian" Unicode character block.
|
jaroslav@68
|
2239 |
* @since 1.7
|
jaroslav@68
|
2240 |
*/
|
jaroslav@68
|
2241 |
public static final UnicodeBlock OLD_SOUTH_ARABIAN =
|
jaroslav@68
|
2242 |
new UnicodeBlock("OLD_SOUTH_ARABIAN",
|
jaroslav@68
|
2243 |
"OLD SOUTH ARABIAN",
|
jaroslav@68
|
2244 |
"OLDSOUTHARABIAN");
|
jaroslav@68
|
2245 |
|
jaroslav@68
|
2246 |
/**
|
jaroslav@68
|
2247 |
* Constant for the "Avestan" Unicode character block.
|
jaroslav@68
|
2248 |
* @since 1.7
|
jaroslav@68
|
2249 |
*/
|
jaroslav@68
|
2250 |
public static final UnicodeBlock AVESTAN =
|
jaroslav@68
|
2251 |
new UnicodeBlock("AVESTAN");
|
jaroslav@68
|
2252 |
|
jaroslav@68
|
2253 |
/**
|
jaroslav@68
|
2254 |
* Constant for the "Inscriptional Parthian" Unicode character block.
|
jaroslav@68
|
2255 |
* @since 1.7
|
jaroslav@68
|
2256 |
*/
|
jaroslav@68
|
2257 |
public static final UnicodeBlock INSCRIPTIONAL_PARTHIAN =
|
jaroslav@68
|
2258 |
new UnicodeBlock("INSCRIPTIONAL_PARTHIAN",
|
jaroslav@68
|
2259 |
"INSCRIPTIONAL PARTHIAN",
|
jaroslav@68
|
2260 |
"INSCRIPTIONALPARTHIAN");
|
jaroslav@68
|
2261 |
|
jaroslav@68
|
2262 |
/**
|
jaroslav@68
|
2263 |
* Constant for the "Inscriptional Pahlavi" Unicode character block.
|
jaroslav@68
|
2264 |
* @since 1.7
|
jaroslav@68
|
2265 |
*/
|
jaroslav@68
|
2266 |
public static final UnicodeBlock INSCRIPTIONAL_PAHLAVI =
|
jaroslav@68
|
2267 |
new UnicodeBlock("INSCRIPTIONAL_PAHLAVI",
|
jaroslav@68
|
2268 |
"INSCRIPTIONAL PAHLAVI",
|
jaroslav@68
|
2269 |
"INSCRIPTIONALPAHLAVI");
|
jaroslav@68
|
2270 |
|
jaroslav@68
|
2271 |
/**
|
jaroslav@68
|
2272 |
* Constant for the "Old Turkic" Unicode character block.
|
jaroslav@68
|
2273 |
* @since 1.7
|
jaroslav@68
|
2274 |
*/
|
jaroslav@68
|
2275 |
public static final UnicodeBlock OLD_TURKIC =
|
jaroslav@68
|
2276 |
new UnicodeBlock("OLD_TURKIC",
|
jaroslav@68
|
2277 |
"OLD TURKIC",
|
jaroslav@68
|
2278 |
"OLDTURKIC");
|
jaroslav@68
|
2279 |
|
jaroslav@68
|
2280 |
/**
|
jaroslav@68
|
2281 |
* Constant for the "Rumi Numeral Symbols" Unicode character block.
|
jaroslav@68
|
2282 |
* @since 1.7
|
jaroslav@68
|
2283 |
*/
|
jaroslav@68
|
2284 |
public static final UnicodeBlock RUMI_NUMERAL_SYMBOLS =
|
jaroslav@68
|
2285 |
new UnicodeBlock("RUMI_NUMERAL_SYMBOLS",
|
jaroslav@68
|
2286 |
"RUMI NUMERAL SYMBOLS",
|
jaroslav@68
|
2287 |
"RUMINUMERALSYMBOLS");
|
jaroslav@68
|
2288 |
|
jaroslav@68
|
2289 |
/**
|
jaroslav@68
|
2290 |
* Constant for the "Brahmi" Unicode character block.
|
jaroslav@68
|
2291 |
* @since 1.7
|
jaroslav@68
|
2292 |
*/
|
jaroslav@68
|
2293 |
public static final UnicodeBlock BRAHMI =
|
jaroslav@68
|
2294 |
new UnicodeBlock("BRAHMI");
|
jaroslav@68
|
2295 |
|
jaroslav@68
|
2296 |
/**
|
jaroslav@68
|
2297 |
* Constant for the "Kaithi" Unicode character block.
|
jaroslav@68
|
2298 |
* @since 1.7
|
jaroslav@68
|
2299 |
*/
|
jaroslav@68
|
2300 |
public static final UnicodeBlock KAITHI =
|
jaroslav@68
|
2301 |
new UnicodeBlock("KAITHI");
|
jaroslav@68
|
2302 |
|
jaroslav@68
|
2303 |
/**
|
jaroslav@68
|
2304 |
* Constant for the "Cuneiform" Unicode character block.
|
jaroslav@68
|
2305 |
* @since 1.7
|
jaroslav@68
|
2306 |
*/
|
jaroslav@68
|
2307 |
public static final UnicodeBlock CUNEIFORM =
|
jaroslav@68
|
2308 |
new UnicodeBlock("CUNEIFORM");
|
jaroslav@68
|
2309 |
|
jaroslav@68
|
2310 |
/**
|
jaroslav@68
|
2311 |
* Constant for the "Cuneiform Numbers and Punctuation" Unicode
|
jaroslav@68
|
2312 |
* character block.
|
jaroslav@68
|
2313 |
* @since 1.7
|
jaroslav@68
|
2314 |
*/
|
jaroslav@68
|
2315 |
public static final UnicodeBlock CUNEIFORM_NUMBERS_AND_PUNCTUATION =
|
jaroslav@68
|
2316 |
new UnicodeBlock("CUNEIFORM_NUMBERS_AND_PUNCTUATION",
|
jaroslav@68
|
2317 |
"CUNEIFORM NUMBERS AND PUNCTUATION",
|
jaroslav@68
|
2318 |
"CUNEIFORMNUMBERSANDPUNCTUATION");
|
jaroslav@68
|
2319 |
|
jaroslav@68
|
2320 |
/**
|
jaroslav@68
|
2321 |
* Constant for the "Egyptian Hieroglyphs" Unicode character block.
|
jaroslav@68
|
2322 |
* @since 1.7
|
jaroslav@68
|
2323 |
*/
|
jaroslav@68
|
2324 |
public static final UnicodeBlock EGYPTIAN_HIEROGLYPHS =
|
jaroslav@68
|
2325 |
new UnicodeBlock("EGYPTIAN_HIEROGLYPHS",
|
jaroslav@68
|
2326 |
"EGYPTIAN HIEROGLYPHS",
|
jaroslav@68
|
2327 |
"EGYPTIANHIEROGLYPHS");
|
jaroslav@68
|
2328 |
|
jaroslav@68
|
2329 |
/**
|
jaroslav@68
|
2330 |
* Constant for the "Bamum Supplement" Unicode character block.
|
jaroslav@68
|
2331 |
* @since 1.7
|
jaroslav@68
|
2332 |
*/
|
jaroslav@68
|
2333 |
public static final UnicodeBlock BAMUM_SUPPLEMENT =
|
jaroslav@68
|
2334 |
new UnicodeBlock("BAMUM_SUPPLEMENT",
|
jaroslav@68
|
2335 |
"BAMUM SUPPLEMENT",
|
jaroslav@68
|
2336 |
"BAMUMSUPPLEMENT");
|
jaroslav@68
|
2337 |
|
jaroslav@68
|
2338 |
/**
|
jaroslav@68
|
2339 |
* Constant for the "Kana Supplement" Unicode character block.
|
jaroslav@68
|
2340 |
* @since 1.7
|
jaroslav@68
|
2341 |
*/
|
jaroslav@68
|
2342 |
public static final UnicodeBlock KANA_SUPPLEMENT =
|
jaroslav@68
|
2343 |
new UnicodeBlock("KANA_SUPPLEMENT",
|
jaroslav@68
|
2344 |
"KANA SUPPLEMENT",
|
jaroslav@68
|
2345 |
"KANASUPPLEMENT");
|
jaroslav@68
|
2346 |
|
jaroslav@68
|
2347 |
/**
|
jaroslav@68
|
2348 |
* Constant for the "Ancient Greek Musical Notation" Unicode character
|
jaroslav@68
|
2349 |
* block.
|
jaroslav@68
|
2350 |
* @since 1.7
|
jaroslav@68
|
2351 |
*/
|
jaroslav@68
|
2352 |
public static final UnicodeBlock ANCIENT_GREEK_MUSICAL_NOTATION =
|
jaroslav@68
|
2353 |
new UnicodeBlock("ANCIENT_GREEK_MUSICAL_NOTATION",
|
jaroslav@68
|
2354 |
"ANCIENT GREEK MUSICAL NOTATION",
|
jaroslav@68
|
2355 |
"ANCIENTGREEKMUSICALNOTATION");
|
jaroslav@68
|
2356 |
|
jaroslav@68
|
2357 |
/**
|
jaroslav@68
|
2358 |
* Constant for the "Counting Rod Numerals" Unicode character block.
|
jaroslav@68
|
2359 |
* @since 1.7
|
jaroslav@68
|
2360 |
*/
|
jaroslav@68
|
2361 |
public static final UnicodeBlock COUNTING_ROD_NUMERALS =
|
jaroslav@68
|
2362 |
new UnicodeBlock("COUNTING_ROD_NUMERALS",
|
jaroslav@68
|
2363 |
"COUNTING ROD NUMERALS",
|
jaroslav@68
|
2364 |
"COUNTINGRODNUMERALS");
|
jaroslav@68
|
2365 |
|
jaroslav@68
|
2366 |
/**
|
jaroslav@68
|
2367 |
* Constant for the "Mahjong Tiles" Unicode character block.
|
jaroslav@68
|
2368 |
* @since 1.7
|
jaroslav@68
|
2369 |
*/
|
jaroslav@68
|
2370 |
public static final UnicodeBlock MAHJONG_TILES =
|
jaroslav@68
|
2371 |
new UnicodeBlock("MAHJONG_TILES",
|
jaroslav@68
|
2372 |
"MAHJONG TILES",
|
jaroslav@68
|
2373 |
"MAHJONGTILES");
|
jaroslav@68
|
2374 |
|
jaroslav@68
|
2375 |
/**
|
jaroslav@68
|
2376 |
* Constant for the "Domino Tiles" Unicode character block.
|
jaroslav@68
|
2377 |
* @since 1.7
|
jaroslav@68
|
2378 |
*/
|
jaroslav@68
|
2379 |
public static final UnicodeBlock DOMINO_TILES =
|
jaroslav@68
|
2380 |
new UnicodeBlock("DOMINO_TILES",
|
jaroslav@68
|
2381 |
"DOMINO TILES",
|
jaroslav@68
|
2382 |
"DOMINOTILES");
|
jaroslav@68
|
2383 |
|
jaroslav@68
|
2384 |
/**
|
jaroslav@68
|
2385 |
* Constant for the "Playing Cards" Unicode character block.
|
jaroslav@68
|
2386 |
* @since 1.7
|
jaroslav@68
|
2387 |
*/
|
jaroslav@68
|
2388 |
public static final UnicodeBlock PLAYING_CARDS =
|
jaroslav@68
|
2389 |
new UnicodeBlock("PLAYING_CARDS",
|
jaroslav@68
|
2390 |
"PLAYING CARDS",
|
jaroslav@68
|
2391 |
"PLAYINGCARDS");
|
jaroslav@68
|
2392 |
|
jaroslav@68
|
2393 |
/**
|
jaroslav@68
|
2394 |
* Constant for the "Enclosed Alphanumeric Supplement" Unicode character
|
jaroslav@68
|
2395 |
* block.
|
jaroslav@68
|
2396 |
* @since 1.7
|
jaroslav@68
|
2397 |
*/
|
jaroslav@68
|
2398 |
public static final UnicodeBlock ENCLOSED_ALPHANUMERIC_SUPPLEMENT =
|
jaroslav@68
|
2399 |
new UnicodeBlock("ENCLOSED_ALPHANUMERIC_SUPPLEMENT",
|
jaroslav@68
|
2400 |
"ENCLOSED ALPHANUMERIC SUPPLEMENT",
|
jaroslav@68
|
2401 |
"ENCLOSEDALPHANUMERICSUPPLEMENT");
|
jaroslav@68
|
2402 |
|
jaroslav@68
|
2403 |
/**
|
jaroslav@68
|
2404 |
* Constant for the "Enclosed Ideographic Supplement" Unicode character
|
jaroslav@68
|
2405 |
* block.
|
jaroslav@68
|
2406 |
* @since 1.7
|
jaroslav@68
|
2407 |
*/
|
jaroslav@68
|
2408 |
public static final UnicodeBlock ENCLOSED_IDEOGRAPHIC_SUPPLEMENT =
|
jaroslav@68
|
2409 |
new UnicodeBlock("ENCLOSED_IDEOGRAPHIC_SUPPLEMENT",
|
jaroslav@68
|
2410 |
"ENCLOSED IDEOGRAPHIC SUPPLEMENT",
|
jaroslav@68
|
2411 |
"ENCLOSEDIDEOGRAPHICSUPPLEMENT");
|
jaroslav@68
|
2412 |
|
jaroslav@68
|
2413 |
/**
|
jaroslav@68
|
2414 |
* Constant for the "Miscellaneous Symbols And Pictographs" Unicode
|
jaroslav@68
|
2415 |
* character block.
|
jaroslav@68
|
2416 |
* @since 1.7
|
jaroslav@68
|
2417 |
*/
|
jaroslav@68
|
2418 |
public static final UnicodeBlock MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS =
|
jaroslav@68
|
2419 |
new UnicodeBlock("MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS",
|
jaroslav@68
|
2420 |
"MISCELLANEOUS SYMBOLS AND PICTOGRAPHS",
|
jaroslav@68
|
2421 |
"MISCELLANEOUSSYMBOLSANDPICTOGRAPHS");
|
jaroslav@68
|
2422 |
|
jaroslav@68
|
2423 |
/**
|
jaroslav@68
|
2424 |
* Constant for the "Emoticons" Unicode character block.
|
jaroslav@68
|
2425 |
* @since 1.7
|
jaroslav@68
|
2426 |
*/
|
jaroslav@68
|
2427 |
public static final UnicodeBlock EMOTICONS =
|
jaroslav@68
|
2428 |
new UnicodeBlock("EMOTICONS");
|
jaroslav@68
|
2429 |
|
jaroslav@68
|
2430 |
/**
|
jaroslav@68
|
2431 |
* Constant for the "Transport And Map Symbols" Unicode character block.
|
jaroslav@68
|
2432 |
* @since 1.7
|
jaroslav@68
|
2433 |
*/
|
jaroslav@68
|
2434 |
public static final UnicodeBlock TRANSPORT_AND_MAP_SYMBOLS =
|
jaroslav@68
|
2435 |
new UnicodeBlock("TRANSPORT_AND_MAP_SYMBOLS",
|
jaroslav@68
|
2436 |
"TRANSPORT AND MAP SYMBOLS",
|
jaroslav@68
|
2437 |
"TRANSPORTANDMAPSYMBOLS");
|
jaroslav@68
|
2438 |
|
jaroslav@68
|
2439 |
/**
|
jaroslav@68
|
2440 |
* Constant for the "Alchemical Symbols" Unicode character block.
|
jaroslav@68
|
2441 |
* @since 1.7
|
jaroslav@68
|
2442 |
*/
|
jaroslav@68
|
2443 |
public static final UnicodeBlock ALCHEMICAL_SYMBOLS =
|
jaroslav@68
|
2444 |
new UnicodeBlock("ALCHEMICAL_SYMBOLS",
|
jaroslav@68
|
2445 |
"ALCHEMICAL SYMBOLS",
|
jaroslav@68
|
2446 |
"ALCHEMICALSYMBOLS");
|
jaroslav@68
|
2447 |
|
jaroslav@68
|
2448 |
/**
|
jaroslav@68
|
2449 |
* Constant for the "CJK Unified Ideographs Extension C" Unicode
|
jaroslav@68
|
2450 |
* character block.
|
jaroslav@68
|
2451 |
* @since 1.7
|
jaroslav@68
|
2452 |
*/
|
jaroslav@68
|
2453 |
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C =
|
jaroslav@68
|
2454 |
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C",
|
jaroslav@68
|
2455 |
"CJK UNIFIED IDEOGRAPHS EXTENSION C",
|
jaroslav@68
|
2456 |
"CJKUNIFIEDIDEOGRAPHSEXTENSIONC");
|
jaroslav@68
|
2457 |
|
jaroslav@68
|
2458 |
/**
|
jaroslav@68
|
2459 |
* Constant for the "CJK Unified Ideographs Extension D" Unicode
|
jaroslav@68
|
2460 |
* character block.
|
jaroslav@68
|
2461 |
* @since 1.7
|
jaroslav@68
|
2462 |
*/
|
jaroslav@68
|
2463 |
public static final UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D =
|
jaroslav@68
|
2464 |
new UnicodeBlock("CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D",
|
jaroslav@68
|
2465 |
"CJK UNIFIED IDEOGRAPHS EXTENSION D",
|
jaroslav@68
|
2466 |
"CJKUNIFIEDIDEOGRAPHSEXTENSIOND");
|
jaroslav@68
|
2467 |
|
jaroslav@68
|
2468 |
private static final int blockStarts[] = {
|
jaroslav@68
|
2469 |
0x0000, // 0000..007F; Basic Latin
|
jaroslav@68
|
2470 |
0x0080, // 0080..00FF; Latin-1 Supplement
|
jaroslav@68
|
2471 |
0x0100, // 0100..017F; Latin Extended-A
|
jaroslav@68
|
2472 |
0x0180, // 0180..024F; Latin Extended-B
|
jaroslav@68
|
2473 |
0x0250, // 0250..02AF; IPA Extensions
|
jaroslav@68
|
2474 |
0x02B0, // 02B0..02FF; Spacing Modifier Letters
|
jaroslav@68
|
2475 |
0x0300, // 0300..036F; Combining Diacritical Marks
|
jaroslav@68
|
2476 |
0x0370, // 0370..03FF; Greek and Coptic
|
jaroslav@68
|
2477 |
0x0400, // 0400..04FF; Cyrillic
|
jaroslav@68
|
2478 |
0x0500, // 0500..052F; Cyrillic Supplement
|
jaroslav@68
|
2479 |
0x0530, // 0530..058F; Armenian
|
jaroslav@68
|
2480 |
0x0590, // 0590..05FF; Hebrew
|
jaroslav@68
|
2481 |
0x0600, // 0600..06FF; Arabic
|
jaroslav@68
|
2482 |
0x0700, // 0700..074F; Syriac
|
jaroslav@68
|
2483 |
0x0750, // 0750..077F; Arabic Supplement
|
jaroslav@68
|
2484 |
0x0780, // 0780..07BF; Thaana
|
jaroslav@68
|
2485 |
0x07C0, // 07C0..07FF; NKo
|
jaroslav@68
|
2486 |
0x0800, // 0800..083F; Samaritan
|
jaroslav@68
|
2487 |
0x0840, // 0840..085F; Mandaic
|
jaroslav@68
|
2488 |
0x0860, // unassigned
|
jaroslav@68
|
2489 |
0x0900, // 0900..097F; Devanagari
|
jaroslav@68
|
2490 |
0x0980, // 0980..09FF; Bengali
|
jaroslav@68
|
2491 |
0x0A00, // 0A00..0A7F; Gurmukhi
|
jaroslav@68
|
2492 |
0x0A80, // 0A80..0AFF; Gujarati
|
jaroslav@68
|
2493 |
0x0B00, // 0B00..0B7F; Oriya
|
jaroslav@68
|
2494 |
0x0B80, // 0B80..0BFF; Tamil
|
jaroslav@68
|
2495 |
0x0C00, // 0C00..0C7F; Telugu
|
jaroslav@68
|
2496 |
0x0C80, // 0C80..0CFF; Kannada
|
jaroslav@68
|
2497 |
0x0D00, // 0D00..0D7F; Malayalam
|
jaroslav@68
|
2498 |
0x0D80, // 0D80..0DFF; Sinhala
|
jaroslav@68
|
2499 |
0x0E00, // 0E00..0E7F; Thai
|
jaroslav@68
|
2500 |
0x0E80, // 0E80..0EFF; Lao
|
jaroslav@68
|
2501 |
0x0F00, // 0F00..0FFF; Tibetan
|
jaroslav@68
|
2502 |
0x1000, // 1000..109F; Myanmar
|
jaroslav@68
|
2503 |
0x10A0, // 10A0..10FF; Georgian
|
jaroslav@68
|
2504 |
0x1100, // 1100..11FF; Hangul Jamo
|
jaroslav@68
|
2505 |
0x1200, // 1200..137F; Ethiopic
|
jaroslav@68
|
2506 |
0x1380, // 1380..139F; Ethiopic Supplement
|
jaroslav@68
|
2507 |
0x13A0, // 13A0..13FF; Cherokee
|
jaroslav@68
|
2508 |
0x1400, // 1400..167F; Unified Canadian Aboriginal Syllabics
|
jaroslav@68
|
2509 |
0x1680, // 1680..169F; Ogham
|
jaroslav@68
|
2510 |
0x16A0, // 16A0..16FF; Runic
|
jaroslav@68
|
2511 |
0x1700, // 1700..171F; Tagalog
|
jaroslav@68
|
2512 |
0x1720, // 1720..173F; Hanunoo
|
jaroslav@68
|
2513 |
0x1740, // 1740..175F; Buhid
|
jaroslav@68
|
2514 |
0x1760, // 1760..177F; Tagbanwa
|
jaroslav@68
|
2515 |
0x1780, // 1780..17FF; Khmer
|
jaroslav@68
|
2516 |
0x1800, // 1800..18AF; Mongolian
|
jaroslav@68
|
2517 |
0x18B0, // 18B0..18FF; Unified Canadian Aboriginal Syllabics Extended
|
jaroslav@68
|
2518 |
0x1900, // 1900..194F; Limbu
|
jaroslav@68
|
2519 |
0x1950, // 1950..197F; Tai Le
|
jaroslav@68
|
2520 |
0x1980, // 1980..19DF; New Tai Lue
|
jaroslav@68
|
2521 |
0x19E0, // 19E0..19FF; Khmer Symbols
|
jaroslav@68
|
2522 |
0x1A00, // 1A00..1A1F; Buginese
|
jaroslav@68
|
2523 |
0x1A20, // 1A20..1AAF; Tai Tham
|
jaroslav@68
|
2524 |
0x1AB0, // unassigned
|
jaroslav@68
|
2525 |
0x1B00, // 1B00..1B7F; Balinese
|
jaroslav@68
|
2526 |
0x1B80, // 1B80..1BBF; Sundanese
|
jaroslav@68
|
2527 |
0x1BC0, // 1BC0..1BFF; Batak
|
jaroslav@68
|
2528 |
0x1C00, // 1C00..1C4F; Lepcha
|
jaroslav@68
|
2529 |
0x1C50, // 1C50..1C7F; Ol Chiki
|
jaroslav@68
|
2530 |
0x1C80, // unassigned
|
jaroslav@68
|
2531 |
0x1CD0, // 1CD0..1CFF; Vedic Extensions
|
jaroslav@68
|
2532 |
0x1D00, // 1D00..1D7F; Phonetic Extensions
|
jaroslav@68
|
2533 |
0x1D80, // 1D80..1DBF; Phonetic Extensions Supplement
|
jaroslav@68
|
2534 |
0x1DC0, // 1DC0..1DFF; Combining Diacritical Marks Supplement
|
jaroslav@68
|
2535 |
0x1E00, // 1E00..1EFF; Latin Extended Additional
|
jaroslav@68
|
2536 |
0x1F00, // 1F00..1FFF; Greek Extended
|
jaroslav@68
|
2537 |
0x2000, // 2000..206F; General Punctuation
|
jaroslav@68
|
2538 |
0x2070, // 2070..209F; Superscripts and Subscripts
|
jaroslav@68
|
2539 |
0x20A0, // 20A0..20CF; Currency Symbols
|
jaroslav@68
|
2540 |
0x20D0, // 20D0..20FF; Combining Diacritical Marks for Symbols
|
jaroslav@68
|
2541 |
0x2100, // 2100..214F; Letterlike Symbols
|
jaroslav@68
|
2542 |
0x2150, // 2150..218F; Number Forms
|
jaroslav@68
|
2543 |
0x2190, // 2190..21FF; Arrows
|
jaroslav@68
|
2544 |
0x2200, // 2200..22FF; Mathematical Operators
|
jaroslav@68
|
2545 |
0x2300, // 2300..23FF; Miscellaneous Technical
|
jaroslav@68
|
2546 |
0x2400, // 2400..243F; Control Pictures
|
jaroslav@68
|
2547 |
0x2440, // 2440..245F; Optical Character Recognition
|
jaroslav@68
|
2548 |
0x2460, // 2460..24FF; Enclosed Alphanumerics
|
jaroslav@68
|
2549 |
0x2500, // 2500..257F; Box Drawing
|
jaroslav@68
|
2550 |
0x2580, // 2580..259F; Block Elements
|
jaroslav@68
|
2551 |
0x25A0, // 25A0..25FF; Geometric Shapes
|
jaroslav@68
|
2552 |
0x2600, // 2600..26FF; Miscellaneous Symbols
|
jaroslav@68
|
2553 |
0x2700, // 2700..27BF; Dingbats
|
jaroslav@68
|
2554 |
0x27C0, // 27C0..27EF; Miscellaneous Mathematical Symbols-A
|
jaroslav@68
|
2555 |
0x27F0, // 27F0..27FF; Supplemental Arrows-A
|
jaroslav@68
|
2556 |
0x2800, // 2800..28FF; Braille Patterns
|
jaroslav@68
|
2557 |
0x2900, // 2900..297F; Supplemental Arrows-B
|
jaroslav@68
|
2558 |
0x2980, // 2980..29FF; Miscellaneous Mathematical Symbols-B
|
jaroslav@68
|
2559 |
0x2A00, // 2A00..2AFF; Supplemental Mathematical Operators
|
jaroslav@68
|
2560 |
0x2B00, // 2B00..2BFF; Miscellaneous Symbols and Arrows
|
jaroslav@68
|
2561 |
0x2C00, // 2C00..2C5F; Glagolitic
|
jaroslav@68
|
2562 |
0x2C60, // 2C60..2C7F; Latin Extended-C
|
jaroslav@68
|
2563 |
0x2C80, // 2C80..2CFF; Coptic
|
jaroslav@68
|
2564 |
0x2D00, // 2D00..2D2F; Georgian Supplement
|
jaroslav@68
|
2565 |
0x2D30, // 2D30..2D7F; Tifinagh
|
jaroslav@68
|
2566 |
0x2D80, // 2D80..2DDF; Ethiopic Extended
|
jaroslav@68
|
2567 |
0x2DE0, // 2DE0..2DFF; Cyrillic Extended-A
|
jaroslav@68
|
2568 |
0x2E00, // 2E00..2E7F; Supplemental Punctuation
|
jaroslav@68
|
2569 |
0x2E80, // 2E80..2EFF; CJK Radicals Supplement
|
jaroslav@68
|
2570 |
0x2F00, // 2F00..2FDF; Kangxi Radicals
|
jaroslav@68
|
2571 |
0x2FE0, // unassigned
|
jaroslav@68
|
2572 |
0x2FF0, // 2FF0..2FFF; Ideographic Description Characters
|
jaroslav@68
|
2573 |
0x3000, // 3000..303F; CJK Symbols and Punctuation
|
jaroslav@68
|
2574 |
0x3040, // 3040..309F; Hiragana
|
jaroslav@68
|
2575 |
0x30A0, // 30A0..30FF; Katakana
|
jaroslav@68
|
2576 |
0x3100, // 3100..312F; Bopomofo
|
jaroslav@68
|
2577 |
0x3130, // 3130..318F; Hangul Compatibility Jamo
|
jaroslav@68
|
2578 |
0x3190, // 3190..319F; Kanbun
|
jaroslav@68
|
2579 |
0x31A0, // 31A0..31BF; Bopomofo Extended
|
jaroslav@68
|
2580 |
0x31C0, // 31C0..31EF; CJK Strokes
|
jaroslav@68
|
2581 |
0x31F0, // 31F0..31FF; Katakana Phonetic Extensions
|
jaroslav@68
|
2582 |
0x3200, // 3200..32FF; Enclosed CJK Letters and Months
|
jaroslav@68
|
2583 |
0x3300, // 3300..33FF; CJK Compatibility
|
jaroslav@68
|
2584 |
0x3400, // 3400..4DBF; CJK Unified Ideographs Extension A
|
jaroslav@68
|
2585 |
0x4DC0, // 4DC0..4DFF; Yijing Hexagram Symbols
|
jaroslav@68
|
2586 |
0x4E00, // 4E00..9FFF; CJK Unified Ideographs
|
jaroslav@68
|
2587 |
0xA000, // A000..A48F; Yi Syllables
|
jaroslav@68
|
2588 |
0xA490, // A490..A4CF; Yi Radicals
|
jaroslav@68
|
2589 |
0xA4D0, // A4D0..A4FF; Lisu
|
jaroslav@68
|
2590 |
0xA500, // A500..A63F; Vai
|
jaroslav@68
|
2591 |
0xA640, // A640..A69F; Cyrillic Extended-B
|
jaroslav@68
|
2592 |
0xA6A0, // A6A0..A6FF; Bamum
|
jaroslav@68
|
2593 |
0xA700, // A700..A71F; Modifier Tone Letters
|
jaroslav@68
|
2594 |
0xA720, // A720..A7FF; Latin Extended-D
|
jaroslav@68
|
2595 |
0xA800, // A800..A82F; Syloti Nagri
|
jaroslav@68
|
2596 |
0xA830, // A830..A83F; Common Indic Number Forms
|
jaroslav@68
|
2597 |
0xA840, // A840..A87F; Phags-pa
|
jaroslav@68
|
2598 |
0xA880, // A880..A8DF; Saurashtra
|
jaroslav@68
|
2599 |
0xA8E0, // A8E0..A8FF; Devanagari Extended
|
jaroslav@68
|
2600 |
0xA900, // A900..A92F; Kayah Li
|
jaroslav@68
|
2601 |
0xA930, // A930..A95F; Rejang
|
jaroslav@68
|
2602 |
0xA960, // A960..A97F; Hangul Jamo Extended-A
|
jaroslav@68
|
2603 |
0xA980, // A980..A9DF; Javanese
|
jaroslav@68
|
2604 |
0xA9E0, // unassigned
|
jaroslav@68
|
2605 |
0xAA00, // AA00..AA5F; Cham
|
jaroslav@68
|
2606 |
0xAA60, // AA60..AA7F; Myanmar Extended-A
|
jaroslav@68
|
2607 |
0xAA80, // AA80..AADF; Tai Viet
|
jaroslav@68
|
2608 |
0xAAE0, // unassigned
|
jaroslav@68
|
2609 |
0xAB00, // AB00..AB2F; Ethiopic Extended-A
|
jaroslav@68
|
2610 |
0xAB30, // unassigned
|
jaroslav@68
|
2611 |
0xABC0, // ABC0..ABFF; Meetei Mayek
|
jaroslav@68
|
2612 |
0xAC00, // AC00..D7AF; Hangul Syllables
|
jaroslav@68
|
2613 |
0xD7B0, // D7B0..D7FF; Hangul Jamo Extended-B
|
jaroslav@68
|
2614 |
0xD800, // D800..DB7F; High Surrogates
|
jaroslav@68
|
2615 |
0xDB80, // DB80..DBFF; High Private Use Surrogates
|
jaroslav@68
|
2616 |
0xDC00, // DC00..DFFF; Low Surrogates
|
jaroslav@68
|
2617 |
0xE000, // E000..F8FF; Private Use Area
|
jaroslav@68
|
2618 |
0xF900, // F900..FAFF; CJK Compatibility Ideographs
|
jaroslav@68
|
2619 |
0xFB00, // FB00..FB4F; Alphabetic Presentation Forms
|
jaroslav@68
|
2620 |
0xFB50, // FB50..FDFF; Arabic Presentation Forms-A
|
jaroslav@68
|
2621 |
0xFE00, // FE00..FE0F; Variation Selectors
|
jaroslav@68
|
2622 |
0xFE10, // FE10..FE1F; Vertical Forms
|
jaroslav@68
|
2623 |
0xFE20, // FE20..FE2F; Combining Half Marks
|
jaroslav@68
|
2624 |
0xFE30, // FE30..FE4F; CJK Compatibility Forms
|
jaroslav@68
|
2625 |
0xFE50, // FE50..FE6F; Small Form Variants
|
jaroslav@68
|
2626 |
0xFE70, // FE70..FEFF; Arabic Presentation Forms-B
|
jaroslav@68
|
2627 |
0xFF00, // FF00..FFEF; Halfwidth and Fullwidth Forms
|
jaroslav@68
|
2628 |
0xFFF0, // FFF0..FFFF; Specials
|
jaroslav@68
|
2629 |
0x10000, // 10000..1007F; Linear B Syllabary
|
jaroslav@68
|
2630 |
0x10080, // 10080..100FF; Linear B Ideograms
|
jaroslav@68
|
2631 |
0x10100, // 10100..1013F; Aegean Numbers
|
jaroslav@68
|
2632 |
0x10140, // 10140..1018F; Ancient Greek Numbers
|
jaroslav@68
|
2633 |
0x10190, // 10190..101CF; Ancient Symbols
|
jaroslav@68
|
2634 |
0x101D0, // 101D0..101FF; Phaistos Disc
|
jaroslav@68
|
2635 |
0x10200, // unassigned
|
jaroslav@68
|
2636 |
0x10280, // 10280..1029F; Lycian
|
jaroslav@68
|
2637 |
0x102A0, // 102A0..102DF; Carian
|
jaroslav@68
|
2638 |
0x102E0, // unassigned
|
jaroslav@68
|
2639 |
0x10300, // 10300..1032F; Old Italic
|
jaroslav@68
|
2640 |
0x10330, // 10330..1034F; Gothic
|
jaroslav@68
|
2641 |
0x10350, // unassigned
|
jaroslav@68
|
2642 |
0x10380, // 10380..1039F; Ugaritic
|
jaroslav@68
|
2643 |
0x103A0, // 103A0..103DF; Old Persian
|
jaroslav@68
|
2644 |
0x103E0, // unassigned
|
jaroslav@68
|
2645 |
0x10400, // 10400..1044F; Deseret
|
jaroslav@68
|
2646 |
0x10450, // 10450..1047F; Shavian
|
jaroslav@68
|
2647 |
0x10480, // 10480..104AF; Osmanya
|
jaroslav@68
|
2648 |
0x104B0, // unassigned
|
jaroslav@68
|
2649 |
0x10800, // 10800..1083F; Cypriot Syllabary
|
jaroslav@68
|
2650 |
0x10840, // 10840..1085F; Imperial Aramaic
|
jaroslav@68
|
2651 |
0x10860, // unassigned
|
jaroslav@68
|
2652 |
0x10900, // 10900..1091F; Phoenician
|
jaroslav@68
|
2653 |
0x10920, // 10920..1093F; Lydian
|
jaroslav@68
|
2654 |
0x10940, // unassigned
|
jaroslav@68
|
2655 |
0x10A00, // 10A00..10A5F; Kharoshthi
|
jaroslav@68
|
2656 |
0x10A60, // 10A60..10A7F; Old South Arabian
|
jaroslav@68
|
2657 |
0x10A80, // unassigned
|
jaroslav@68
|
2658 |
0x10B00, // 10B00..10B3F; Avestan
|
jaroslav@68
|
2659 |
0x10B40, // 10B40..10B5F; Inscriptional Parthian
|
jaroslav@68
|
2660 |
0x10B60, // 10B60..10B7F; Inscriptional Pahlavi
|
jaroslav@68
|
2661 |
0x10B80, // unassigned
|
jaroslav@68
|
2662 |
0x10C00, // 10C00..10C4F; Old Turkic
|
jaroslav@68
|
2663 |
0x10C50, // unassigned
|
jaroslav@68
|
2664 |
0x10E60, // 10E60..10E7F; Rumi Numeral Symbols
|
jaroslav@68
|
2665 |
0x10E80, // unassigned
|
jaroslav@68
|
2666 |
0x11000, // 11000..1107F; Brahmi
|
jaroslav@68
|
2667 |
0x11080, // 11080..110CF; Kaithi
|
jaroslav@68
|
2668 |
0x110D0, // unassigned
|
jaroslav@68
|
2669 |
0x12000, // 12000..123FF; Cuneiform
|
jaroslav@68
|
2670 |
0x12400, // 12400..1247F; Cuneiform Numbers and Punctuation
|
jaroslav@68
|
2671 |
0x12480, // unassigned
|
jaroslav@68
|
2672 |
0x13000, // 13000..1342F; Egyptian Hieroglyphs
|
jaroslav@68
|
2673 |
0x13430, // unassigned
|
jaroslav@68
|
2674 |
0x16800, // 16800..16A3F; Bamum Supplement
|
jaroslav@68
|
2675 |
0x16A40, // unassigned
|
jaroslav@68
|
2676 |
0x1B000, // 1B000..1B0FF; Kana Supplement
|
jaroslav@68
|
2677 |
0x1B100, // unassigned
|
jaroslav@68
|
2678 |
0x1D000, // 1D000..1D0FF; Byzantine Musical Symbols
|
jaroslav@68
|
2679 |
0x1D100, // 1D100..1D1FF; Musical Symbols
|
jaroslav@68
|
2680 |
0x1D200, // 1D200..1D24F; Ancient Greek Musical Notation
|
jaroslav@68
|
2681 |
0x1D250, // unassigned
|
jaroslav@68
|
2682 |
0x1D300, // 1D300..1D35F; Tai Xuan Jing Symbols
|
jaroslav@68
|
2683 |
0x1D360, // 1D360..1D37F; Counting Rod Numerals
|
jaroslav@68
|
2684 |
0x1D380, // unassigned
|
jaroslav@68
|
2685 |
0x1D400, // 1D400..1D7FF; Mathematical Alphanumeric Symbols
|
jaroslav@68
|
2686 |
0x1D800, // unassigned
|
jaroslav@68
|
2687 |
0x1F000, // 1F000..1F02F; Mahjong Tiles
|
jaroslav@68
|
2688 |
0x1F030, // 1F030..1F09F; Domino Tiles
|
jaroslav@68
|
2689 |
0x1F0A0, // 1F0A0..1F0FF; Playing Cards
|
jaroslav@68
|
2690 |
0x1F100, // 1F100..1F1FF; Enclosed Alphanumeric Supplement
|
jaroslav@68
|
2691 |
0x1F200, // 1F200..1F2FF; Enclosed Ideographic Supplement
|
jaroslav@68
|
2692 |
0x1F300, // 1F300..1F5FF; Miscellaneous Symbols And Pictographs
|
jaroslav@68
|
2693 |
0x1F600, // 1F600..1F64F; Emoticons
|
jaroslav@68
|
2694 |
0x1F650, // unassigned
|
jaroslav@68
|
2695 |
0x1F680, // 1F680..1F6FF; Transport And Map Symbols
|
jaroslav@68
|
2696 |
0x1F700, // 1F700..1F77F; Alchemical Symbols
|
jaroslav@68
|
2697 |
0x1F780, // unassigned
|
jaroslav@68
|
2698 |
0x20000, // 20000..2A6DF; CJK Unified Ideographs Extension B
|
jaroslav@68
|
2699 |
0x2A6E0, // unassigned
|
jaroslav@68
|
2700 |
0x2A700, // 2A700..2B73F; CJK Unified Ideographs Extension C
|
jaroslav@68
|
2701 |
0x2B740, // 2B740..2B81F; CJK Unified Ideographs Extension D
|
jaroslav@68
|
2702 |
0x2B820, // unassigned
|
jaroslav@68
|
2703 |
0x2F800, // 2F800..2FA1F; CJK Compatibility Ideographs Supplement
|
jaroslav@68
|
2704 |
0x2FA20, // unassigned
|
jaroslav@68
|
2705 |
0xE0000, // E0000..E007F; Tags
|
jaroslav@68
|
2706 |
0xE0080, // unassigned
|
jaroslav@68
|
2707 |
0xE0100, // E0100..E01EF; Variation Selectors Supplement
|
jaroslav@68
|
2708 |
0xE01F0, // unassigned
|
jaroslav@68
|
2709 |
0xF0000, // F0000..FFFFF; Supplementary Private Use Area-A
|
jaroslav@68
|
2710 |
0x100000 // 100000..10FFFF; Supplementary Private Use Area-B
|
jaroslav@68
|
2711 |
};
|
jaroslav@68
|
2712 |
|
jaroslav@68
|
2713 |
private static final UnicodeBlock[] blocks = {
|
jaroslav@68
|
2714 |
BASIC_LATIN,
|
jaroslav@68
|
2715 |
LATIN_1_SUPPLEMENT,
|
jaroslav@68
|
2716 |
LATIN_EXTENDED_A,
|
jaroslav@68
|
2717 |
LATIN_EXTENDED_B,
|
jaroslav@68
|
2718 |
IPA_EXTENSIONS,
|
jaroslav@68
|
2719 |
SPACING_MODIFIER_LETTERS,
|
jaroslav@68
|
2720 |
COMBINING_DIACRITICAL_MARKS,
|
jaroslav@68
|
2721 |
GREEK,
|
jaroslav@68
|
2722 |
CYRILLIC,
|
jaroslav@68
|
2723 |
CYRILLIC_SUPPLEMENTARY,
|
jaroslav@68
|
2724 |
ARMENIAN,
|
jaroslav@68
|
2725 |
HEBREW,
|
jaroslav@68
|
2726 |
ARABIC,
|
jaroslav@68
|
2727 |
SYRIAC,
|
jaroslav@68
|
2728 |
ARABIC_SUPPLEMENT,
|
jaroslav@68
|
2729 |
THAANA,
|
jaroslav@68
|
2730 |
NKO,
|
jaroslav@68
|
2731 |
SAMARITAN,
|
jaroslav@68
|
2732 |
MANDAIC,
|
jaroslav@68
|
2733 |
null,
|
jaroslav@68
|
2734 |
DEVANAGARI,
|
jaroslav@68
|
2735 |
BENGALI,
|
jaroslav@68
|
2736 |
GURMUKHI,
|
jaroslav@68
|
2737 |
GUJARATI,
|
jaroslav@68
|
2738 |
ORIYA,
|
jaroslav@68
|
2739 |
TAMIL,
|
jaroslav@68
|
2740 |
TELUGU,
|
jaroslav@68
|
2741 |
KANNADA,
|
jaroslav@68
|
2742 |
MALAYALAM,
|
jaroslav@68
|
2743 |
SINHALA,
|
jaroslav@68
|
2744 |
THAI,
|
jaroslav@68
|
2745 |
LAO,
|
jaroslav@68
|
2746 |
TIBETAN,
|
jaroslav@68
|
2747 |
MYANMAR,
|
jaroslav@68
|
2748 |
GEORGIAN,
|
jaroslav@68
|
2749 |
HANGUL_JAMO,
|
jaroslav@68
|
2750 |
ETHIOPIC,
|
jaroslav@68
|
2751 |
ETHIOPIC_SUPPLEMENT,
|
jaroslav@68
|
2752 |
CHEROKEE,
|
jaroslav@68
|
2753 |
UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS,
|
jaroslav@68
|
2754 |
OGHAM,
|
jaroslav@68
|
2755 |
RUNIC,
|
jaroslav@68
|
2756 |
TAGALOG,
|
jaroslav@68
|
2757 |
HANUNOO,
|
jaroslav@68
|
2758 |
BUHID,
|
jaroslav@68
|
2759 |
TAGBANWA,
|
jaroslav@68
|
2760 |
KHMER,
|
jaroslav@68
|
2761 |
MONGOLIAN,
|
jaroslav@68
|
2762 |
UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS_EXTENDED,
|
jaroslav@68
|
2763 |
LIMBU,
|
jaroslav@68
|
2764 |
TAI_LE,
|
jaroslav@68
|
2765 |
NEW_TAI_LUE,
|
jaroslav@68
|
2766 |
KHMER_SYMBOLS,
|
jaroslav@68
|
2767 |
BUGINESE,
|
jaroslav@68
|
2768 |
TAI_THAM,
|
jaroslav@68
|
2769 |
null,
|
jaroslav@68
|
2770 |
BALINESE,
|
jaroslav@68
|
2771 |
SUNDANESE,
|
jaroslav@68
|
2772 |
BATAK,
|
jaroslav@68
|
2773 |
LEPCHA,
|
jaroslav@68
|
2774 |
OL_CHIKI,
|
jaroslav@68
|
2775 |
null,
|
jaroslav@68
|
2776 |
VEDIC_EXTENSIONS,
|
jaroslav@68
|
2777 |
PHONETIC_EXTENSIONS,
|
jaroslav@68
|
2778 |
PHONETIC_EXTENSIONS_SUPPLEMENT,
|
jaroslav@68
|
2779 |
COMBINING_DIACRITICAL_MARKS_SUPPLEMENT,
|
jaroslav@68
|
2780 |
LATIN_EXTENDED_ADDITIONAL,
|
jaroslav@68
|
2781 |
GREEK_EXTENDED,
|
jaroslav@68
|
2782 |
GENERAL_PUNCTUATION,
|
jaroslav@68
|
2783 |
SUPERSCRIPTS_AND_SUBSCRIPTS,
|
jaroslav@68
|
2784 |
CURRENCY_SYMBOLS,
|
jaroslav@68
|
2785 |
COMBINING_MARKS_FOR_SYMBOLS,
|
jaroslav@68
|
2786 |
LETTERLIKE_SYMBOLS,
|
jaroslav@68
|
2787 |
NUMBER_FORMS,
|
jaroslav@68
|
2788 |
ARROWS,
|
jaroslav@68
|
2789 |
MATHEMATICAL_OPERATORS,
|
jaroslav@68
|
2790 |
MISCELLANEOUS_TECHNICAL,
|
jaroslav@68
|
2791 |
CONTROL_PICTURES,
|
jaroslav@68
|
2792 |
OPTICAL_CHARACTER_RECOGNITION,
|
jaroslav@68
|
2793 |
ENCLOSED_ALPHANUMERICS,
|
jaroslav@68
|
2794 |
BOX_DRAWING,
|
jaroslav@68
|
2795 |
BLOCK_ELEMENTS,
|
jaroslav@68
|
2796 |
GEOMETRIC_SHAPES,
|
jaroslav@68
|
2797 |
MISCELLANEOUS_SYMBOLS,
|
jaroslav@68
|
2798 |
DINGBATS,
|
jaroslav@68
|
2799 |
MISCELLANEOUS_MATHEMATICAL_SYMBOLS_A,
|
jaroslav@68
|
2800 |
SUPPLEMENTAL_ARROWS_A,
|
jaroslav@68
|
2801 |
BRAILLE_PATTERNS,
|
jaroslav@68
|
2802 |
SUPPLEMENTAL_ARROWS_B,
|
jaroslav@68
|
2803 |
MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B,
|
jaroslav@68
|
2804 |
SUPPLEMENTAL_MATHEMATICAL_OPERATORS,
|
jaroslav@68
|
2805 |
MISCELLANEOUS_SYMBOLS_AND_ARROWS,
|
jaroslav@68
|
2806 |
GLAGOLITIC,
|
jaroslav@68
|
2807 |
LATIN_EXTENDED_C,
|
jaroslav@68
|
2808 |
COPTIC,
|
jaroslav@68
|
2809 |
GEORGIAN_SUPPLEMENT,
|
jaroslav@68
|
2810 |
TIFINAGH,
|
jaroslav@68
|
2811 |
ETHIOPIC_EXTENDED,
|
jaroslav@68
|
2812 |
CYRILLIC_EXTENDED_A,
|
jaroslav@68
|
2813 |
SUPPLEMENTAL_PUNCTUATION,
|
jaroslav@68
|
2814 |
CJK_RADICALS_SUPPLEMENT,
|
jaroslav@68
|
2815 |
KANGXI_RADICALS,
|
jaroslav@68
|
2816 |
null,
|
jaroslav@68
|
2817 |
IDEOGRAPHIC_DESCRIPTION_CHARACTERS,
|
jaroslav@68
|
2818 |
CJK_SYMBOLS_AND_PUNCTUATION,
|
jaroslav@68
|
2819 |
HIRAGANA,
|
jaroslav@68
|
2820 |
KATAKANA,
|
jaroslav@68
|
2821 |
BOPOMOFO,
|
jaroslav@68
|
2822 |
HANGUL_COMPATIBILITY_JAMO,
|
jaroslav@68
|
2823 |
KANBUN,
|
jaroslav@68
|
2824 |
BOPOMOFO_EXTENDED,
|
jaroslav@68
|
2825 |
CJK_STROKES,
|
jaroslav@68
|
2826 |
KATAKANA_PHONETIC_EXTENSIONS,
|
jaroslav@68
|
2827 |
ENCLOSED_CJK_LETTERS_AND_MONTHS,
|
jaroslav@68
|
2828 |
CJK_COMPATIBILITY,
|
jaroslav@68
|
2829 |
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A,
|
jaroslav@68
|
2830 |
YIJING_HEXAGRAM_SYMBOLS,
|
jaroslav@68
|
2831 |
CJK_UNIFIED_IDEOGRAPHS,
|
jaroslav@68
|
2832 |
YI_SYLLABLES,
|
jaroslav@68
|
2833 |
YI_RADICALS,
|
jaroslav@68
|
2834 |
LISU,
|
jaroslav@68
|
2835 |
VAI,
|
jaroslav@68
|
2836 |
CYRILLIC_EXTENDED_B,
|
jaroslav@68
|
2837 |
BAMUM,
|
jaroslav@68
|
2838 |
MODIFIER_TONE_LETTERS,
|
jaroslav@68
|
2839 |
LATIN_EXTENDED_D,
|
jaroslav@68
|
2840 |
SYLOTI_NAGRI,
|
jaroslav@68
|
2841 |
COMMON_INDIC_NUMBER_FORMS,
|
jaroslav@68
|
2842 |
PHAGS_PA,
|
jaroslav@68
|
2843 |
SAURASHTRA,
|
jaroslav@68
|
2844 |
DEVANAGARI_EXTENDED,
|
jaroslav@68
|
2845 |
KAYAH_LI,
|
jaroslav@68
|
2846 |
REJANG,
|
jaroslav@68
|
2847 |
HANGUL_JAMO_EXTENDED_A,
|
jaroslav@68
|
2848 |
JAVANESE,
|
jaroslav@68
|
2849 |
null,
|
jaroslav@68
|
2850 |
CHAM,
|
jaroslav@68
|
2851 |
MYANMAR_EXTENDED_A,
|
jaroslav@68
|
2852 |
TAI_VIET,
|
jaroslav@68
|
2853 |
null,
|
jaroslav@68
|
2854 |
ETHIOPIC_EXTENDED_A,
|
jaroslav@68
|
2855 |
null,
|
jaroslav@68
|
2856 |
MEETEI_MAYEK,
|
jaroslav@68
|
2857 |
HANGUL_SYLLABLES,
|
jaroslav@68
|
2858 |
HANGUL_JAMO_EXTENDED_B,
|
jaroslav@68
|
2859 |
HIGH_SURROGATES,
|
jaroslav@68
|
2860 |
HIGH_PRIVATE_USE_SURROGATES,
|
jaroslav@68
|
2861 |
LOW_SURROGATES,
|
jaroslav@68
|
2862 |
PRIVATE_USE_AREA,
|
jaroslav@68
|
2863 |
CJK_COMPATIBILITY_IDEOGRAPHS,
|
jaroslav@68
|
2864 |
ALPHABETIC_PRESENTATION_FORMS,
|
jaroslav@68
|
2865 |
ARABIC_PRESENTATION_FORMS_A,
|
jaroslav@68
|
2866 |
VARIATION_SELECTORS,
|
jaroslav@68
|
2867 |
VERTICAL_FORMS,
|
jaroslav@68
|
2868 |
COMBINING_HALF_MARKS,
|
jaroslav@68
|
2869 |
CJK_COMPATIBILITY_FORMS,
|
jaroslav@68
|
2870 |
SMALL_FORM_VARIANTS,
|
jaroslav@68
|
2871 |
ARABIC_PRESENTATION_FORMS_B,
|
jaroslav@68
|
2872 |
HALFWIDTH_AND_FULLWIDTH_FORMS,
|
jaroslav@68
|
2873 |
SPECIALS,
|
jaroslav@68
|
2874 |
LINEAR_B_SYLLABARY,
|
jaroslav@68
|
2875 |
LINEAR_B_IDEOGRAMS,
|
jaroslav@68
|
2876 |
AEGEAN_NUMBERS,
|
jaroslav@68
|
2877 |
ANCIENT_GREEK_NUMBERS,
|
jaroslav@68
|
2878 |
ANCIENT_SYMBOLS,
|
jaroslav@68
|
2879 |
PHAISTOS_DISC,
|
jaroslav@68
|
2880 |
null,
|
jaroslav@68
|
2881 |
LYCIAN,
|
jaroslav@68
|
2882 |
CARIAN,
|
jaroslav@68
|
2883 |
null,
|
jaroslav@68
|
2884 |
OLD_ITALIC,
|
jaroslav@68
|
2885 |
GOTHIC,
|
jaroslav@68
|
2886 |
null,
|
jaroslav@68
|
2887 |
UGARITIC,
|
jaroslav@68
|
2888 |
OLD_PERSIAN,
|
jaroslav@68
|
2889 |
null,
|
jaroslav@68
|
2890 |
DESERET,
|
jaroslav@68
|
2891 |
SHAVIAN,
|
jaroslav@68
|
2892 |
OSMANYA,
|
jaroslav@68
|
2893 |
null,
|
jaroslav@68
|
2894 |
CYPRIOT_SYLLABARY,
|
jaroslav@68
|
2895 |
IMPERIAL_ARAMAIC,
|
jaroslav@68
|
2896 |
null,
|
jaroslav@68
|
2897 |
PHOENICIAN,
|
jaroslav@68
|
2898 |
LYDIAN,
|
jaroslav@68
|
2899 |
null,
|
jaroslav@68
|
2900 |
KHAROSHTHI,
|
jaroslav@68
|
2901 |
OLD_SOUTH_ARABIAN,
|
jaroslav@68
|
2902 |
null,
|
jaroslav@68
|
2903 |
AVESTAN,
|
jaroslav@68
|
2904 |
INSCRIPTIONAL_PARTHIAN,
|
jaroslav@68
|
2905 |
INSCRIPTIONAL_PAHLAVI,
|
jaroslav@68
|
2906 |
null,
|
jaroslav@68
|
2907 |
OLD_TURKIC,
|
jaroslav@68
|
2908 |
null,
|
jaroslav@68
|
2909 |
RUMI_NUMERAL_SYMBOLS,
|
jaroslav@68
|
2910 |
null,
|
jaroslav@68
|
2911 |
BRAHMI,
|
jaroslav@68
|
2912 |
KAITHI,
|
jaroslav@68
|
2913 |
null,
|
jaroslav@68
|
2914 |
CUNEIFORM,
|
jaroslav@68
|
2915 |
CUNEIFORM_NUMBERS_AND_PUNCTUATION,
|
jaroslav@68
|
2916 |
null,
|
jaroslav@68
|
2917 |
EGYPTIAN_HIEROGLYPHS,
|
jaroslav@68
|
2918 |
null,
|
jaroslav@68
|
2919 |
BAMUM_SUPPLEMENT,
|
jaroslav@68
|
2920 |
null,
|
jaroslav@68
|
2921 |
KANA_SUPPLEMENT,
|
jaroslav@68
|
2922 |
null,
|
jaroslav@68
|
2923 |
BYZANTINE_MUSICAL_SYMBOLS,
|
jaroslav@68
|
2924 |
MUSICAL_SYMBOLS,
|
jaroslav@68
|
2925 |
ANCIENT_GREEK_MUSICAL_NOTATION,
|
jaroslav@68
|
2926 |
null,
|
jaroslav@68
|
2927 |
TAI_XUAN_JING_SYMBOLS,
|
jaroslav@68
|
2928 |
COUNTING_ROD_NUMERALS,
|
jaroslav@68
|
2929 |
null,
|
jaroslav@68
|
2930 |
MATHEMATICAL_ALPHANUMERIC_SYMBOLS,
|
jaroslav@68
|
2931 |
null,
|
jaroslav@68
|
2932 |
MAHJONG_TILES,
|
jaroslav@68
|
2933 |
DOMINO_TILES,
|
jaroslav@68
|
2934 |
PLAYING_CARDS,
|
jaroslav@68
|
2935 |
ENCLOSED_ALPHANUMERIC_SUPPLEMENT,
|
jaroslav@68
|
2936 |
ENCLOSED_IDEOGRAPHIC_SUPPLEMENT,
|
jaroslav@68
|
2937 |
MISCELLANEOUS_SYMBOLS_AND_PICTOGRAPHS,
|
jaroslav@68
|
2938 |
EMOTICONS,
|
jaroslav@68
|
2939 |
null,
|
jaroslav@68
|
2940 |
TRANSPORT_AND_MAP_SYMBOLS,
|
jaroslav@68
|
2941 |
ALCHEMICAL_SYMBOLS,
|
jaroslav@68
|
2942 |
null,
|
jaroslav@68
|
2943 |
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_B,
|
jaroslav@68
|
2944 |
null,
|
jaroslav@68
|
2945 |
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C,
|
jaroslav@68
|
2946 |
CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D,
|
jaroslav@68
|
2947 |
null,
|
jaroslav@68
|
2948 |
CJK_COMPATIBILITY_IDEOGRAPHS_SUPPLEMENT,
|
jaroslav@68
|
2949 |
null,
|
jaroslav@68
|
2950 |
TAGS,
|
jaroslav@68
|
2951 |
null,
|
jaroslav@68
|
2952 |
VARIATION_SELECTORS_SUPPLEMENT,
|
jaroslav@68
|
2953 |
null,
|
jaroslav@68
|
2954 |
SUPPLEMENTARY_PRIVATE_USE_AREA_A,
|
jaroslav@68
|
2955 |
SUPPLEMENTARY_PRIVATE_USE_AREA_B
|
jaroslav@68
|
2956 |
};
|
jaroslav@68
|
2957 |
|
jaroslav@68
|
2958 |
|
jaroslav@68
|
2959 |
/**
|
jaroslav@68
|
2960 |
* Returns the object representing the Unicode block containing the
|
jaroslav@68
|
2961 |
* given character, or {@code null} if the character is not a
|
jaroslav@68
|
2962 |
* member of a defined block.
|
jaroslav@68
|
2963 |
*
|
jaroslav@68
|
2964 |
* <p><b>Note:</b> This method cannot handle
|
jaroslav@68
|
2965 |
* <a href="Character.html#supplementary"> supplementary
|
jaroslav@68
|
2966 |
* characters</a>. To support all Unicode characters, including
|
jaroslav@68
|
2967 |
* supplementary characters, use the {@link #of(int)} method.
|
jaroslav@68
|
2968 |
*
|
jaroslav@68
|
2969 |
* @param c The character in question
|
jaroslav@68
|
2970 |
* @return The {@code UnicodeBlock} instance representing the
|
jaroslav@68
|
2971 |
* Unicode block of which this character is a member, or
|
jaroslav@68
|
2972 |
* {@code null} if the character is not a member of any
|
jaroslav@68
|
2973 |
* Unicode block
|
jaroslav@68
|
2974 |
*/
|
jaroslav@68
|
2975 |
public static UnicodeBlock of(char c) {
|
jaroslav@68
|
2976 |
return of((int)c);
|
jaroslav@68
|
2977 |
}
|
jaroslav@68
|
2978 |
|
jaroslav@68
|
2979 |
/**
|
jaroslav@68
|
2980 |
* Returns the object representing the Unicode block
|
jaroslav@68
|
2981 |
* containing the given character (Unicode code point), or
|
jaroslav@68
|
2982 |
* {@code null} if the character is not a member of a
|
jaroslav@68
|
2983 |
* defined block.
|
jaroslav@68
|
2984 |
*
|
jaroslav@68
|
2985 |
* @param codePoint the character (Unicode code point) in question.
|
jaroslav@68
|
2986 |
* @return The {@code UnicodeBlock} instance representing the
|
jaroslav@68
|
2987 |
* Unicode block of which this character is a member, or
|
jaroslav@68
|
2988 |
* {@code null} if the character is not a member of any
|
jaroslav@68
|
2989 |
* Unicode block
|
jaroslav@68
|
2990 |
* @exception IllegalArgumentException if the specified
|
jaroslav@68
|
2991 |
* {@code codePoint} is an invalid Unicode code point.
|
jaroslav@68
|
2992 |
* @see Character#isValidCodePoint(int)
|
jaroslav@68
|
2993 |
* @since 1.5
|
jaroslav@68
|
2994 |
*/
|
jaroslav@68
|
2995 |
public static UnicodeBlock of(int codePoint) {
|
jaroslav@68
|
2996 |
if (!isValidCodePoint(codePoint)) {
|
jaroslav@68
|
2997 |
throw new IllegalArgumentException();
|
jaroslav@68
|
2998 |
}
|
jaroslav@68
|
2999 |
|
jaroslav@68
|
3000 |
int top, bottom, current;
|
jaroslav@68
|
3001 |
bottom = 0;
|
jaroslav@68
|
3002 |
top = blockStarts.length;
|
jaroslav@68
|
3003 |
current = top/2;
|
jaroslav@68
|
3004 |
|
jaroslav@68
|
3005 |
// invariant: top > current >= bottom && codePoint >= unicodeBlockStarts[bottom]
|
jaroslav@68
|
3006 |
while (top - bottom > 1) {
|
jaroslav@68
|
3007 |
if (codePoint >= blockStarts[current]) {
|
jaroslav@68
|
3008 |
bottom = current;
|
jaroslav@68
|
3009 |
} else {
|
jaroslav@68
|
3010 |
top = current;
|
jaroslav@68
|
3011 |
}
|
jaroslav@68
|
3012 |
current = (top + bottom) / 2;
|
jaroslav@68
|
3013 |
}
|
jaroslav@68
|
3014 |
return blocks[current];
|
jaroslav@68
|
3015 |
}
|
jaroslav@68
|
3016 |
|
jaroslav@68
|
3017 |
/**
|
jaroslav@68
|
3018 |
* Returns the UnicodeBlock with the given name. Block
|
jaroslav@68
|
3019 |
* names are determined by The Unicode Standard. The file
|
jaroslav@68
|
3020 |
* Blocks-<version>.txt defines blocks for a particular
|
jaroslav@68
|
3021 |
* version of the standard. The {@link Character} class specifies
|
jaroslav@68
|
3022 |
* the version of the standard that it supports.
|
jaroslav@68
|
3023 |
* <p>
|
jaroslav@68
|
3024 |
* This method accepts block names in the following forms:
|
jaroslav@68
|
3025 |
* <ol>
|
jaroslav@68
|
3026 |
* <li> Canonical block names as defined by the Unicode Standard.
|
jaroslav@68
|
3027 |
* For example, the standard defines a "Basic Latin" block. Therefore, this
|
jaroslav@68
|
3028 |
* method accepts "Basic Latin" as a valid block name. The documentation of
|
jaroslav@68
|
3029 |
* each UnicodeBlock provides the canonical name.
|
jaroslav@68
|
3030 |
* <li>Canonical block names with all spaces removed. For example, "BasicLatin"
|
jaroslav@68
|
3031 |
* is a valid block name for the "Basic Latin" block.
|
jaroslav@68
|
3032 |
* <li>The text representation of each constant UnicodeBlock identifier.
|
jaroslav@68
|
3033 |
* For example, this method will return the {@link #BASIC_LATIN} block if
|
jaroslav@68
|
3034 |
* provided with the "BASIC_LATIN" name. This form replaces all spaces and
|
jaroslav@68
|
3035 |
* hyphens in the canonical name with underscores.
|
jaroslav@68
|
3036 |
* </ol>
|
jaroslav@68
|
3037 |
* Finally, character case is ignored for all of the valid block name forms.
|
jaroslav@68
|
3038 |
* For example, "BASIC_LATIN" and "basic_latin" are both valid block names.
|
jaroslav@68
|
3039 |
* The en_US locale's case mapping rules are used to provide case-insensitive
|
jaroslav@68
|
3040 |
* string comparisons for block name validation.
|
jaroslav@68
|
3041 |
* <p>
|
jaroslav@68
|
3042 |
* If the Unicode Standard changes block names, both the previous and
|
jaroslav@68
|
3043 |
* current names will be accepted.
|
jaroslav@68
|
3044 |
*
|
jaroslav@68
|
3045 |
* @param blockName A {@code UnicodeBlock} name.
|
jaroslav@68
|
3046 |
* @return The {@code UnicodeBlock} instance identified
|
jaroslav@68
|
3047 |
* by {@code blockName}
|
jaroslav@68
|
3048 |
* @throws IllegalArgumentException if {@code blockName} is an
|
jaroslav@68
|
3049 |
* invalid name
|
jaroslav@68
|
3050 |
* @throws NullPointerException if {@code blockName} is null
|
jaroslav@68
|
3051 |
* @since 1.5
|
jaroslav@68
|
3052 |
*/
|
jaroslav@68
|
3053 |
public static final UnicodeBlock forName(String blockName) {
|
jaroslav@68
|
3054 |
UnicodeBlock block = map.get(blockName.toUpperCase(Locale.US));
|
jaroslav@68
|
3055 |
if (block == null) {
|
jaroslav@68
|
3056 |
throw new IllegalArgumentException();
|
jaroslav@68
|
3057 |
}
|
jaroslav@68
|
3058 |
return block;
|
jaroslav@68
|
3059 |
}
|
jaroslav@68
|
3060 |
}
|
jaroslav@68
|
3061 |
|
jaroslav@68
|
3062 |
|
jaroslav@68
|
3063 |
/**
|
jaroslav@68
|
3064 |
* A family of character subsets representing the character scripts
|
jaroslav@68
|
3065 |
* defined in the <a href="http://www.unicode.org/reports/tr24/">
|
jaroslav@68
|
3066 |
* <i>Unicode Standard Annex #24: Script Names</i></a>. Every Unicode
|
jaroslav@68
|
3067 |
* character is assigned to a single Unicode script, either a specific
|
jaroslav@68
|
3068 |
* script, such as {@link Character.UnicodeScript#LATIN Latin}, or
|
jaroslav@68
|
3069 |
* one of the following three special values,
|
jaroslav@68
|
3070 |
* {@link Character.UnicodeScript#INHERITED Inherited},
|
jaroslav@68
|
3071 |
* {@link Character.UnicodeScript#COMMON Common} or
|
jaroslav@68
|
3072 |
* {@link Character.UnicodeScript#UNKNOWN Unknown}.
|
jaroslav@68
|
3073 |
*
|
jaroslav@68
|
3074 |
* @since 1.7
|
jaroslav@68
|
3075 |
*/
|
jaroslav@68
|
3076 |
public static enum UnicodeScript {
|
jaroslav@68
|
3077 |
/**
|
jaroslav@68
|
3078 |
* Unicode script "Common".
|
jaroslav@68
|
3079 |
*/
|
jaroslav@68
|
3080 |
COMMON,
|
jaroslav@68
|
3081 |
|
jaroslav@68
|
3082 |
/**
|
jaroslav@68
|
3083 |
* Unicode script "Latin".
|
jaroslav@68
|
3084 |
*/
|
jaroslav@68
|
3085 |
LATIN,
|
jaroslav@68
|
3086 |
|
jaroslav@68
|
3087 |
/**
|
jaroslav@68
|
3088 |
* Unicode script "Greek".
|
jaroslav@68
|
3089 |
*/
|
jaroslav@68
|
3090 |
GREEK,
|
jaroslav@68
|
3091 |
|
jaroslav@68
|
3092 |
/**
|
jaroslav@68
|
3093 |
* Unicode script "Cyrillic".
|
jaroslav@68
|
3094 |
*/
|
jaroslav@68
|
3095 |
CYRILLIC,
|
jaroslav@68
|
3096 |
|
jaroslav@68
|
3097 |
/**
|
jaroslav@68
|
3098 |
* Unicode script "Armenian".
|
jaroslav@68
|
3099 |
*/
|
jaroslav@68
|
3100 |
ARMENIAN,
|
jaroslav@68
|
3101 |
|
jaroslav@68
|
3102 |
/**
|
jaroslav@68
|
3103 |
* Unicode script "Hebrew".
|
jaroslav@68
|
3104 |
*/
|
jaroslav@68
|
3105 |
HEBREW,
|
jaroslav@68
|
3106 |
|
jaroslav@68
|
3107 |
/**
|
jaroslav@68
|
3108 |
* Unicode script "Arabic".
|
jaroslav@68
|
3109 |
*/
|
jaroslav@68
|
3110 |
ARABIC,
|
jaroslav@68
|
3111 |
|
jaroslav@68
|
3112 |
/**
|
jaroslav@68
|
3113 |
* Unicode script "Syriac".
|
jaroslav@68
|
3114 |
*/
|
jaroslav@68
|
3115 |
SYRIAC,
|
jaroslav@68
|
3116 |
|
jaroslav@68
|
3117 |
/**
|
jaroslav@68
|
3118 |
* Unicode script "Thaana".
|
jaroslav@68
|
3119 |
*/
|
jaroslav@68
|
3120 |
THAANA,
|
jaroslav@68
|
3121 |
|
jaroslav@68
|
3122 |
/**
|
jaroslav@68
|
3123 |
* Unicode script "Devanagari".
|
jaroslav@68
|
3124 |
*/
|
jaroslav@68
|
3125 |
DEVANAGARI,
|
jaroslav@68
|
3126 |
|
jaroslav@68
|
3127 |
/**
|
jaroslav@68
|
3128 |
* Unicode script "Bengali".
|
jaroslav@68
|
3129 |
*/
|
jaroslav@68
|
3130 |
BENGALI,
|
jaroslav@68
|
3131 |
|
jaroslav@68
|
3132 |
/**
|
jaroslav@68
|
3133 |
* Unicode script "Gurmukhi".
|
jaroslav@68
|
3134 |
*/
|
jaroslav@68
|
3135 |
GURMUKHI,
|
jaroslav@68
|
3136 |
|
jaroslav@68
|
3137 |
/**
|
jaroslav@68
|
3138 |
* Unicode script "Gujarati".
|
jaroslav@68
|
3139 |
*/
|
jaroslav@68
|
3140 |
GUJARATI,
|
jaroslav@68
|
3141 |
|
jaroslav@68
|
3142 |
/**
|
jaroslav@68
|
3143 |
* Unicode script "Oriya".
|
jaroslav@68
|
3144 |
*/
|
jaroslav@68
|
3145 |
ORIYA,
|
jaroslav@68
|
3146 |
|
jaroslav@68
|
3147 |
/**
|
jaroslav@68
|
3148 |
* Unicode script "Tamil".
|
jaroslav@68
|
3149 |
*/
|
jaroslav@68
|
3150 |
TAMIL,
|
jaroslav@68
|
3151 |
|
jaroslav@68
|
3152 |
/**
|
jaroslav@68
|
3153 |
* Unicode script "Telugu".
|
jaroslav@68
|
3154 |
*/
|
jaroslav@68
|
3155 |
TELUGU,
|
jaroslav@68
|
3156 |
|
jaroslav@68
|
3157 |
/**
|
jaroslav@68
|
3158 |
* Unicode script "Kannada".
|
jaroslav@68
|
3159 |
*/
|
jaroslav@68
|
3160 |
KANNADA,
|
jaroslav@68
|
3161 |
|
jaroslav@68
|
3162 |
/**
|
jaroslav@68
|
3163 |
* Unicode script "Malayalam".
|
jaroslav@68
|
3164 |
*/
|
jaroslav@68
|
3165 |
MALAYALAM,
|
jaroslav@68
|
3166 |
|
jaroslav@68
|
3167 |
/**
|
jaroslav@68
|
3168 |
* Unicode script "Sinhala".
|
jaroslav@68
|
3169 |
*/
|
jaroslav@68
|
3170 |
SINHALA,
|
jaroslav@68
|
3171 |
|
jaroslav@68
|
3172 |
/**
|
jaroslav@68
|
3173 |
* Unicode script "Thai".
|
jaroslav@68
|
3174 |
*/
|
jaroslav@68
|
3175 |
THAI,
|
jaroslav@68
|
3176 |
|
jaroslav@68
|
3177 |
/**
|
jaroslav@68
|
3178 |
* Unicode script "Lao".
|
jaroslav@68
|
3179 |
*/
|
jaroslav@68
|
3180 |
LAO,
|
jaroslav@68
|
3181 |
|
jaroslav@68
|
3182 |
/**
|
jaroslav@68
|
3183 |
* Unicode script "Tibetan".
|
jaroslav@68
|
3184 |
*/
|
jaroslav@68
|
3185 |
TIBETAN,
|
jaroslav@68
|
3186 |
|
jaroslav@68
|
3187 |
/**
|
jaroslav@68
|
3188 |
* Unicode script "Myanmar".
|
jaroslav@68
|
3189 |
*/
|
jaroslav@68
|
3190 |
MYANMAR,
|
jaroslav@68
|
3191 |
|
jaroslav@68
|
3192 |
/**
|
jaroslav@68
|
3193 |
* Unicode script "Georgian".
|
jaroslav@68
|
3194 |
*/
|
jaroslav@68
|
3195 |
GEORGIAN,
|
jaroslav@68
|
3196 |
|
jaroslav@68
|
3197 |
/**
|
jaroslav@68
|
3198 |
* Unicode script "Hangul".
|
jaroslav@68
|
3199 |
*/
|
jaroslav@68
|
3200 |
HANGUL,
|
jaroslav@68
|
3201 |
|
jaroslav@68
|
3202 |
/**
|
jaroslav@68
|
3203 |
* Unicode script "Ethiopic".
|
jaroslav@68
|
3204 |
*/
|
jaroslav@68
|
3205 |
ETHIOPIC,
|
jaroslav@68
|
3206 |
|
jaroslav@68
|
3207 |
/**
|
jaroslav@68
|
3208 |
* Unicode script "Cherokee".
|
jaroslav@68
|
3209 |
*/
|
jaroslav@68
|
3210 |
CHEROKEE,
|
jaroslav@68
|
3211 |
|
jaroslav@68
|
3212 |
/**
|
jaroslav@68
|
3213 |
* Unicode script "Canadian_Aboriginal".
|
jaroslav@68
|
3214 |
*/
|
jaroslav@68
|
3215 |
CANADIAN_ABORIGINAL,
|
jaroslav@68
|
3216 |
|
jaroslav@68
|
3217 |
/**
|
jaroslav@68
|
3218 |
* Unicode script "Ogham".
|
jaroslav@68
|
3219 |
*/
|
jaroslav@68
|
3220 |
OGHAM,
|
jaroslav@68
|
3221 |
|
jaroslav@68
|
3222 |
/**
|
jaroslav@68
|
3223 |
* Unicode script "Runic".
|
jaroslav@68
|
3224 |
*/
|
jaroslav@68
|
3225 |
RUNIC,
|
jaroslav@68
|
3226 |
|
jaroslav@68
|
3227 |
/**
|
jaroslav@68
|
3228 |
* Unicode script "Khmer".
|
jaroslav@68
|
3229 |
*/
|
jaroslav@68
|
3230 |
KHMER,
|
jaroslav@68
|
3231 |
|
jaroslav@68
|
3232 |
/**
|
jaroslav@68
|
3233 |
* Unicode script "Mongolian".
|
jaroslav@68
|
3234 |
*/
|
jaroslav@68
|
3235 |
MONGOLIAN,
|
jaroslav@68
|
3236 |
|
jaroslav@68
|
3237 |
/**
|
jaroslav@68
|
3238 |
* Unicode script "Hiragana".
|
jaroslav@68
|
3239 |
*/
|
jaroslav@68
|
3240 |
HIRAGANA,
|
jaroslav@68
|
3241 |
|
jaroslav@68
|
3242 |
/**
|
jaroslav@68
|
3243 |
* Unicode script "Katakana".
|
jaroslav@68
|
3244 |
*/
|
jaroslav@68
|
3245 |
KATAKANA,
|
jaroslav@68
|
3246 |
|
jaroslav@68
|
3247 |
/**
|
jaroslav@68
|
3248 |
* Unicode script "Bopomofo".
|
jaroslav@68
|
3249 |
*/
|
jaroslav@68
|
3250 |
BOPOMOFO,
|
jaroslav@68
|
3251 |
|
jaroslav@68
|
3252 |
/**
|
jaroslav@68
|
3253 |
* Unicode script "Han".
|
jaroslav@68
|
3254 |
*/
|
jaroslav@68
|
3255 |
HAN,
|
jaroslav@68
|
3256 |
|
jaroslav@68
|
3257 |
/**
|
jaroslav@68
|
3258 |
* Unicode script "Yi".
|
jaroslav@68
|
3259 |
*/
|
jaroslav@68
|
3260 |
YI,
|
jaroslav@68
|
3261 |
|
jaroslav@68
|
3262 |
/**
|
jaroslav@68
|
3263 |
* Unicode script "Old_Italic".
|
jaroslav@68
|
3264 |
*/
|
jaroslav@68
|
3265 |
OLD_ITALIC,
|
jaroslav@68
|
3266 |
|
jaroslav@68
|
3267 |
/**
|
jaroslav@68
|
3268 |
* Unicode script "Gothic".
|
jaroslav@68
|
3269 |
*/
|
jaroslav@68
|
3270 |
GOTHIC,
|
jaroslav@68
|
3271 |
|
jaroslav@68
|
3272 |
/**
|
jaroslav@68
|
3273 |
* Unicode script "Deseret".
|
jaroslav@68
|
3274 |
*/
|
jaroslav@68
|
3275 |
DESERET,
|
jaroslav@68
|
3276 |
|
jaroslav@68
|
3277 |
/**
|
jaroslav@68
|
3278 |
* Unicode script "Inherited".
|
jaroslav@68
|
3279 |
*/
|
jaroslav@68
|
3280 |
INHERITED,
|
jaroslav@68
|
3281 |
|
jaroslav@68
|
3282 |
/**
|
jaroslav@68
|
3283 |
* Unicode script "Tagalog".
|
jaroslav@68
|
3284 |
*/
|
jaroslav@68
|
3285 |
TAGALOG,
|
jaroslav@68
|
3286 |
|
jaroslav@68
|
3287 |
/**
|
jaroslav@68
|
3288 |
* Unicode script "Hanunoo".
|
jaroslav@68
|
3289 |
*/
|
jaroslav@68
|
3290 |
HANUNOO,
|
jaroslav@68
|
3291 |
|
jaroslav@68
|
3292 |
/**
|
jaroslav@68
|
3293 |
* Unicode script "Buhid".
|
jaroslav@68
|
3294 |
*/
|
jaroslav@68
|
3295 |
BUHID,
|
jaroslav@68
|
3296 |
|
jaroslav@68
|
3297 |
/**
|
jaroslav@68
|
3298 |
* Unicode script "Tagbanwa".
|
jaroslav@68
|
3299 |
*/
|
jaroslav@68
|
3300 |
TAGBANWA,
|
jaroslav@68
|
3301 |
|
jaroslav@68
|
3302 |
/**
|
jaroslav@68
|
3303 |
* Unicode script "Limbu".
|
jaroslav@68
|
3304 |
*/
|
jaroslav@68
|
3305 |
LIMBU,
|
jaroslav@68
|
3306 |
|
jaroslav@68
|
3307 |
/**
|
jaroslav@68
|
3308 |
* Unicode script "Tai_Le".
|
jaroslav@68
|
3309 |
*/
|
jaroslav@68
|
3310 |
TAI_LE,
|
jaroslav@68
|
3311 |
|
jaroslav@68
|
3312 |
/**
|
jaroslav@68
|
3313 |
* Unicode script "Linear_B".
|
jaroslav@68
|
3314 |
*/
|
jaroslav@68
|
3315 |
LINEAR_B,
|
jaroslav@68
|
3316 |
|
jaroslav@68
|
3317 |
/**
|
jaroslav@68
|
3318 |
* Unicode script "Ugaritic".
|
jaroslav@68
|
3319 |
*/
|
jaroslav@68
|
3320 |
UGARITIC,
|
jaroslav@68
|
3321 |
|
jaroslav@68
|
3322 |
/**
|
jaroslav@68
|
3323 |
* Unicode script "Shavian".
|
jaroslav@68
|
3324 |
*/
|
jaroslav@68
|
3325 |
SHAVIAN,
|
jaroslav@68
|
3326 |
|
jaroslav@68
|
3327 |
/**
|
jaroslav@68
|
3328 |
* Unicode script "Osmanya".
|
jaroslav@68
|
3329 |
*/
|
jaroslav@68
|
3330 |
OSMANYA,
|
jaroslav@68
|
3331 |
|
jaroslav@68
|
3332 |
/**
|
jaroslav@68
|
3333 |
* Unicode script "Cypriot".
|
jaroslav@68
|
3334 |
*/
|
jaroslav@68
|
3335 |
CYPRIOT,
|
jaroslav@68
|
3336 |
|
jaroslav@68
|
3337 |
/**
|
jaroslav@68
|
3338 |
* Unicode script "Braille".
|
jaroslav@68
|
3339 |
*/
|
jaroslav@68
|
3340 |
BRAILLE,
|
jaroslav@68
|
3341 |
|
jaroslav@68
|
3342 |
/**
|
jaroslav@68
|
3343 |
* Unicode script "Buginese".
|
jaroslav@68
|
3344 |
*/
|
jaroslav@68
|
3345 |
BUGINESE,
|
jaroslav@68
|
3346 |
|
jaroslav@68
|
3347 |
/**
|
jaroslav@68
|
3348 |
* Unicode script "Coptic".
|
jaroslav@68
|
3349 |
*/
|
jaroslav@68
|
3350 |
COPTIC,
|
jaroslav@68
|
3351 |
|
jaroslav@68
|
3352 |
/**
|
jaroslav@68
|
3353 |
* Unicode script "New_Tai_Lue".
|
jaroslav@68
|
3354 |
*/
|
jaroslav@68
|
3355 |
NEW_TAI_LUE,
|
jaroslav@68
|
3356 |
|
jaroslav@68
|
3357 |
/**
|
jaroslav@68
|
3358 |
* Unicode script "Glagolitic".
|
jaroslav@68
|
3359 |
*/
|
jaroslav@68
|
3360 |
GLAGOLITIC,
|
jaroslav@68
|
3361 |
|
jaroslav@68
|
3362 |
/**
|
jaroslav@68
|
3363 |
* Unicode script "Tifinagh".
|
jaroslav@68
|
3364 |
*/
|
jaroslav@68
|
3365 |
TIFINAGH,
|
jaroslav@68
|
3366 |
|
jaroslav@68
|
3367 |
/**
|
jaroslav@68
|
3368 |
* Unicode script "Syloti_Nagri".
|
jaroslav@68
|
3369 |
*/
|
jaroslav@68
|
3370 |
SYLOTI_NAGRI,
|
jaroslav@68
|
3371 |
|
jaroslav@68
|
3372 |
/**
|
jaroslav@68
|
3373 |
* Unicode script "Old_Persian".
|
jaroslav@68
|
3374 |
*/
|
jaroslav@68
|
3375 |
OLD_PERSIAN,
|
jaroslav@68
|
3376 |
|
jaroslav@68
|
3377 |
/**
|
jaroslav@68
|
3378 |
* Unicode script "Kharoshthi".
|
jaroslav@68
|
3379 |
*/
|
jaroslav@68
|
3380 |
KHAROSHTHI,
|
jaroslav@68
|
3381 |
|
jaroslav@68
|
3382 |
/**
|
jaroslav@68
|
3383 |
* Unicode script "Balinese".
|
jaroslav@68
|
3384 |
*/
|
jaroslav@68
|
3385 |
BALINESE,
|
jaroslav@68
|
3386 |
|
jaroslav@68
|
3387 |
/**
|
jaroslav@68
|
3388 |
* Unicode script "Cuneiform".
|
jaroslav@68
|
3389 |
*/
|
jaroslav@68
|
3390 |
CUNEIFORM,
|
jaroslav@68
|
3391 |
|
jaroslav@68
|
3392 |
/**
|
jaroslav@68
|
3393 |
* Unicode script "Phoenician".
|
jaroslav@68
|
3394 |
*/
|
jaroslav@68
|
3395 |
PHOENICIAN,
|
jaroslav@68
|
3396 |
|
jaroslav@68
|
3397 |
/**
|
jaroslav@68
|
3398 |
* Unicode script "Phags_Pa".
|
jaroslav@68
|
3399 |
*/
|
jaroslav@68
|
3400 |
PHAGS_PA,
|
jaroslav@68
|
3401 |
|
jaroslav@68
|
3402 |
/**
|
jaroslav@68
|
3403 |
* Unicode script "Nko".
|
jaroslav@68
|
3404 |
*/
|
jaroslav@68
|
3405 |
NKO,
|
jaroslav@68
|
3406 |
|
jaroslav@68
|
3407 |
/**
|
jaroslav@68
|
3408 |
* Unicode script "Sundanese".
|
jaroslav@68
|
3409 |
*/
|
jaroslav@68
|
3410 |
SUNDANESE,
|
jaroslav@68
|
3411 |
|
jaroslav@68
|
3412 |
/**
|
jaroslav@68
|
3413 |
* Unicode script "Batak".
|
jaroslav@68
|
3414 |
*/
|
jaroslav@68
|
3415 |
BATAK,
|
jaroslav@68
|
3416 |
|
jaroslav@68
|
3417 |
/**
|
jaroslav@68
|
3418 |
* Unicode script "Lepcha".
|
jaroslav@68
|
3419 |
*/
|
jaroslav@68
|
3420 |
LEPCHA,
|
jaroslav@68
|
3421 |
|
jaroslav@68
|
3422 |
/**
|
jaroslav@68
|
3423 |
* Unicode script "Ol_Chiki".
|
jaroslav@68
|
3424 |
*/
|
jaroslav@68
|
3425 |
OL_CHIKI,
|
jaroslav@68
|
3426 |
|
jaroslav@68
|
3427 |
/**
|
jaroslav@68
|
3428 |
* Unicode script "Vai".
|
jaroslav@68
|
3429 |
*/
|
jaroslav@68
|
3430 |
VAI,
|
jaroslav@68
|
3431 |
|
jaroslav@68
|
3432 |
/**
|
jaroslav@68
|
3433 |
* Unicode script "Saurashtra".
|
jaroslav@68
|
3434 |
*/
|
jaroslav@68
|
3435 |
SAURASHTRA,
|
jaroslav@68
|
3436 |
|
jaroslav@68
|
3437 |
/**
|
jaroslav@68
|
3438 |
* Unicode script "Kayah_Li".
|
jaroslav@68
|
3439 |
*/
|
jaroslav@68
|
3440 |
KAYAH_LI,
|
jaroslav@68
|
3441 |
|
jaroslav@68
|
3442 |
/**
|
jaroslav@68
|
3443 |
* Unicode script "Rejang".
|
jaroslav@68
|
3444 |
*/
|
jaroslav@68
|
3445 |
REJANG,
|
jaroslav@68
|
3446 |
|
jaroslav@68
|
3447 |
/**
|
jaroslav@68
|
3448 |
* Unicode script "Lycian".
|
jaroslav@68
|
3449 |
*/
|
jaroslav@68
|
3450 |
LYCIAN,
|
jaroslav@68
|
3451 |
|
jaroslav@68
|
3452 |
/**
|
jaroslav@68
|
3453 |
* Unicode script "Carian".
|
jaroslav@68
|
3454 |
*/
|
jaroslav@68
|
3455 |
CARIAN,
|
jaroslav@68
|
3456 |
|
jaroslav@68
|
3457 |
/**
|
jaroslav@68
|
3458 |
* Unicode script "Lydian".
|
jaroslav@68
|
3459 |
*/
|
jaroslav@68
|
3460 |
LYDIAN,
|
jaroslav@68
|
3461 |
|
jaroslav@68
|
3462 |
/**
|
jaroslav@68
|
3463 |
* Unicode script "Cham".
|
jaroslav@68
|
3464 |
*/
|
jaroslav@68
|
3465 |
CHAM,
|
jaroslav@68
|
3466 |
|
jaroslav@68
|
3467 |
/**
|
jaroslav@68
|
3468 |
* Unicode script "Tai_Tham".
|
jaroslav@68
|
3469 |
*/
|
jaroslav@68
|
3470 |
TAI_THAM,
|
jaroslav@68
|
3471 |
|
jaroslav@68
|
3472 |
/**
|
jaroslav@68
|
3473 |
* Unicode script "Tai_Viet".
|
jaroslav@68
|
3474 |
*/
|
jaroslav@68
|
3475 |
TAI_VIET,
|
jaroslav@68
|
3476 |
|
jaroslav@68
|
3477 |
/**
|
jaroslav@68
|
3478 |
* Unicode script "Avestan".
|
jaroslav@68
|
3479 |
*/
|
jaroslav@68
|
3480 |
AVESTAN,
|
jaroslav@68
|
3481 |
|
jaroslav@68
|
3482 |
/**
|
jaroslav@68
|
3483 |
* Unicode script "Egyptian_Hieroglyphs".
|
jaroslav@68
|
3484 |
*/
|
jaroslav@68
|
3485 |
EGYPTIAN_HIEROGLYPHS,
|
jaroslav@68
|
3486 |
|
jaroslav@68
|
3487 |
/**
|
jaroslav@68
|
3488 |
* Unicode script "Samaritan".
|
jaroslav@68
|
3489 |
*/
|
jaroslav@68
|
3490 |
SAMARITAN,
|
jaroslav@68
|
3491 |
|
jaroslav@68
|
3492 |
/**
|
jaroslav@68
|
3493 |
* Unicode script "Mandaic".
|
jaroslav@68
|
3494 |
*/
|
jaroslav@68
|
3495 |
MANDAIC,
|
jaroslav@68
|
3496 |
|
jaroslav@68
|
3497 |
/**
|
jaroslav@68
|
3498 |
* Unicode script "Lisu".
|
jaroslav@68
|
3499 |
*/
|
jaroslav@68
|
3500 |
LISU,
|
jaroslav@68
|
3501 |
|
jaroslav@68
|
3502 |
/**
|
jaroslav@68
|
3503 |
* Unicode script "Bamum".
|
jaroslav@68
|
3504 |
*/
|
jaroslav@68
|
3505 |
BAMUM,
|
jaroslav@68
|
3506 |
|
jaroslav@68
|
3507 |
/**
|
jaroslav@68
|
3508 |
* Unicode script "Javanese".
|
jaroslav@68
|
3509 |
*/
|
jaroslav@68
|
3510 |
JAVANESE,
|
jaroslav@68
|
3511 |
|
jaroslav@68
|
3512 |
/**
|
jaroslav@68
|
3513 |
* Unicode script "Meetei_Mayek".
|
jaroslav@68
|
3514 |
*/
|
jaroslav@68
|
3515 |
MEETEI_MAYEK,
|
jaroslav@68
|
3516 |
|
jaroslav@68
|
3517 |
/**
|
jaroslav@68
|
3518 |
* Unicode script "Imperial_Aramaic".
|
jaroslav@68
|
3519 |
*/
|
jaroslav@68
|
3520 |
IMPERIAL_ARAMAIC,
|
jaroslav@68
|
3521 |
|
jaroslav@68
|
3522 |
/**
|
jaroslav@68
|
3523 |
* Unicode script "Old_South_Arabian".
|
jaroslav@68
|
3524 |
*/
|
jaroslav@68
|
3525 |
OLD_SOUTH_ARABIAN,
|
jaroslav@68
|
3526 |
|
jaroslav@68
|
3527 |
/**
|
jaroslav@68
|
3528 |
* Unicode script "Inscriptional_Parthian".
|
jaroslav@68
|
3529 |
*/
|
jaroslav@68
|
3530 |
INSCRIPTIONAL_PARTHIAN,
|
jaroslav@68
|
3531 |
|
jaroslav@68
|
3532 |
/**
|
jaroslav@68
|
3533 |
* Unicode script "Inscriptional_Pahlavi".
|
jaroslav@68
|
3534 |
*/
|
jaroslav@68
|
3535 |
INSCRIPTIONAL_PAHLAVI,
|
jaroslav@68
|
3536 |
|
jaroslav@68
|
3537 |
/**
|
jaroslav@68
|
3538 |
* Unicode script "Old_Turkic".
|
jaroslav@68
|
3539 |
*/
|
jaroslav@68
|
3540 |
OLD_TURKIC,
|
jaroslav@68
|
3541 |
|
jaroslav@68
|
3542 |
/**
|
jaroslav@68
|
3543 |
* Unicode script "Brahmi".
|
jaroslav@68
|
3544 |
*/
|
jaroslav@68
|
3545 |
BRAHMI,
|
jaroslav@68
|
3546 |
|
jaroslav@68
|
3547 |
/**
|
jaroslav@68
|
3548 |
* Unicode script "Kaithi".
|
jaroslav@68
|
3549 |
*/
|
jaroslav@68
|
3550 |
KAITHI,
|
jaroslav@68
|
3551 |
|
jaroslav@68
|
3552 |
/**
|
jaroslav@68
|
3553 |
* Unicode script "Unknown".
|
jaroslav@68
|
3554 |
*/
|
jaroslav@68
|
3555 |
UNKNOWN;
|
jaroslav@68
|
3556 |
|
jaroslav@68
|
3557 |
private static final int[] scriptStarts = {
|
jaroslav@68
|
3558 |
0x0000, // 0000..0040; COMMON
|
jaroslav@68
|
3559 |
0x0041, // 0041..005A; LATIN
|
jaroslav@68
|
3560 |
0x005B, // 005B..0060; COMMON
|
jaroslav@68
|
3561 |
0x0061, // 0061..007A; LATIN
|
jaroslav@68
|
3562 |
0x007B, // 007B..00A9; COMMON
|
jaroslav@68
|
3563 |
0x00AA, // 00AA..00AA; LATIN
|
jaroslav@68
|
3564 |
0x00AB, // 00AB..00B9; COMMON
|
jaroslav@68
|
3565 |
0x00BA, // 00BA..00BA; LATIN
|
jaroslav@68
|
3566 |
0x00BB, // 00BB..00BF; COMMON
|
jaroslav@68
|
3567 |
0x00C0, // 00C0..00D6; LATIN
|
jaroslav@68
|
3568 |
0x00D7, // 00D7..00D7; COMMON
|
jaroslav@68
|
3569 |
0x00D8, // 00D8..00F6; LATIN
|
jaroslav@68
|
3570 |
0x00F7, // 00F7..00F7; COMMON
|
jaroslav@68
|
3571 |
0x00F8, // 00F8..02B8; LATIN
|
jaroslav@68
|
3572 |
0x02B9, // 02B9..02DF; COMMON
|
jaroslav@68
|
3573 |
0x02E0, // 02E0..02E4; LATIN
|
jaroslav@68
|
3574 |
0x02E5, // 02E5..02E9; COMMON
|
jaroslav@68
|
3575 |
0x02EA, // 02EA..02EB; BOPOMOFO
|
jaroslav@68
|
3576 |
0x02EC, // 02EC..02FF; COMMON
|
jaroslav@68
|
3577 |
0x0300, // 0300..036F; INHERITED
|
jaroslav@68
|
3578 |
0x0370, // 0370..0373; GREEK
|
jaroslav@68
|
3579 |
0x0374, // 0374..0374; COMMON
|
jaroslav@68
|
3580 |
0x0375, // 0375..037D; GREEK
|
jaroslav@68
|
3581 |
0x037E, // 037E..0383; COMMON
|
jaroslav@68
|
3582 |
0x0384, // 0384..0384; GREEK
|
jaroslav@68
|
3583 |
0x0385, // 0385..0385; COMMON
|
jaroslav@68
|
3584 |
0x0386, // 0386..0386; GREEK
|
jaroslav@68
|
3585 |
0x0387, // 0387..0387; COMMON
|
jaroslav@68
|
3586 |
0x0388, // 0388..03E1; GREEK
|
jaroslav@68
|
3587 |
0x03E2, // 03E2..03EF; COPTIC
|
jaroslav@68
|
3588 |
0x03F0, // 03F0..03FF; GREEK
|
jaroslav@68
|
3589 |
0x0400, // 0400..0484; CYRILLIC
|
jaroslav@68
|
3590 |
0x0485, // 0485..0486; INHERITED
|
jaroslav@68
|
3591 |
0x0487, // 0487..0530; CYRILLIC
|
jaroslav@68
|
3592 |
0x0531, // 0531..0588; ARMENIAN
|
jaroslav@68
|
3593 |
0x0589, // 0589..0589; COMMON
|
jaroslav@68
|
3594 |
0x058A, // 058A..0590; ARMENIAN
|
jaroslav@68
|
3595 |
0x0591, // 0591..05FF; HEBREW
|
jaroslav@68
|
3596 |
0x0600, // 0600..060B; ARABIC
|
jaroslav@68
|
3597 |
0x060C, // 060C..060C; COMMON
|
jaroslav@68
|
3598 |
0x060D, // 060D..061A; ARABIC
|
jaroslav@68
|
3599 |
0x061B, // 061B..061D; COMMON
|
jaroslav@68
|
3600 |
0x061E, // 061E..061E; ARABIC
|
jaroslav@68
|
3601 |
0x061F, // 061F..061F; COMMON
|
jaroslav@68
|
3602 |
0x0620, // 0620..063F; ARABIC
|
jaroslav@68
|
3603 |
0x0640, // 0640..0640; COMMON
|
jaroslav@68
|
3604 |
0x0641, // 0641..064A; ARABIC
|
jaroslav@68
|
3605 |
0x064B, // 064B..0655; INHERITED
|
jaroslav@68
|
3606 |
0x0656, // 0656..065E; ARABIC
|
jaroslav@68
|
3607 |
0x065F, // 065F..065F; INHERITED
|
jaroslav@68
|
3608 |
0x0660, // 0660..0669; COMMON
|
jaroslav@68
|
3609 |
0x066A, // 066A..066F; ARABIC
|
jaroslav@68
|
3610 |
0x0670, // 0670..0670; INHERITED
|
jaroslav@68
|
3611 |
0x0671, // 0671..06DC; ARABIC
|
jaroslav@68
|
3612 |
0x06DD, // 06DD..06DD; COMMON
|
jaroslav@68
|
3613 |
0x06DE, // 06DE..06FF; ARABIC
|
jaroslav@68
|
3614 |
0x0700, // 0700..074F; SYRIAC
|
jaroslav@68
|
3615 |
0x0750, // 0750..077F; ARABIC
|
jaroslav@68
|
3616 |
0x0780, // 0780..07BF; THAANA
|
jaroslav@68
|
3617 |
0x07C0, // 07C0..07FF; NKO
|
jaroslav@68
|
3618 |
0x0800, // 0800..083F; SAMARITAN
|
jaroslav@68
|
3619 |
0x0840, // 0840..08FF; MANDAIC
|
jaroslav@68
|
3620 |
0x0900, // 0900..0950; DEVANAGARI
|
jaroslav@68
|
3621 |
0x0951, // 0951..0952; INHERITED
|
jaroslav@68
|
3622 |
0x0953, // 0953..0963; DEVANAGARI
|
jaroslav@68
|
3623 |
0x0964, // 0964..0965; COMMON
|
jaroslav@68
|
3624 |
0x0966, // 0966..096F; DEVANAGARI
|
jaroslav@68
|
3625 |
0x0970, // 0970..0970; COMMON
|
jaroslav@68
|
3626 |
0x0971, // 0971..0980; DEVANAGARI
|
jaroslav@68
|
3627 |
0x0981, // 0981..0A00; BENGALI
|
jaroslav@68
|
3628 |
0x0A01, // 0A01..0A80; GURMUKHI
|
jaroslav@68
|
3629 |
0x0A81, // 0A81..0B00; GUJARATI
|
jaroslav@68
|
3630 |
0x0B01, // 0B01..0B81; ORIYA
|
jaroslav@68
|
3631 |
0x0B82, // 0B82..0C00; TAMIL
|
jaroslav@68
|
3632 |
0x0C01, // 0C01..0C81; TELUGU
|
jaroslav@68
|
3633 |
0x0C82, // 0C82..0CF0; KANNADA
|
jaroslav@68
|
3634 |
0x0D02, // 0D02..0D81; MALAYALAM
|
jaroslav@68
|
3635 |
0x0D82, // 0D82..0E00; SINHALA
|
jaroslav@68
|
3636 |
0x0E01, // 0E01..0E3E; THAI
|
jaroslav@68
|
3637 |
0x0E3F, // 0E3F..0E3F; COMMON
|
jaroslav@68
|
3638 |
0x0E40, // 0E40..0E80; THAI
|
jaroslav@68
|
3639 |
0x0E81, // 0E81..0EFF; LAO
|
jaroslav@68
|
3640 |
0x0F00, // 0F00..0FD4; TIBETAN
|
jaroslav@68
|
3641 |
0x0FD5, // 0FD5..0FD8; COMMON
|
jaroslav@68
|
3642 |
0x0FD9, // 0FD9..0FFF; TIBETAN
|
jaroslav@68
|
3643 |
0x1000, // 1000..109F; MYANMAR
|
jaroslav@68
|
3644 |
0x10A0, // 10A0..10FA; GEORGIAN
|
jaroslav@68
|
3645 |
0x10FB, // 10FB..10FB; COMMON
|
jaroslav@68
|
3646 |
0x10FC, // 10FC..10FF; GEORGIAN
|
jaroslav@68
|
3647 |
0x1100, // 1100..11FF; HANGUL
|
jaroslav@68
|
3648 |
0x1200, // 1200..139F; ETHIOPIC
|
jaroslav@68
|
3649 |
0x13A0, // 13A0..13FF; CHEROKEE
|
jaroslav@68
|
3650 |
0x1400, // 1400..167F; CANADIAN_ABORIGINAL
|
jaroslav@68
|
3651 |
0x1680, // 1680..169F; OGHAM
|
jaroslav@68
|
3652 |
0x16A0, // 16A0..16EA; RUNIC
|
jaroslav@68
|
3653 |
0x16EB, // 16EB..16ED; COMMON
|
jaroslav@68
|
3654 |
0x16EE, // 16EE..16FF; RUNIC
|
jaroslav@68
|
3655 |
0x1700, // 1700..171F; TAGALOG
|
jaroslav@68
|
3656 |
0x1720, // 1720..1734; HANUNOO
|
jaroslav@68
|
3657 |
0x1735, // 1735..173F; COMMON
|
jaroslav@68
|
3658 |
0x1740, // 1740..175F; BUHID
|
jaroslav@68
|
3659 |
0x1760, // 1760..177F; TAGBANWA
|
jaroslav@68
|
3660 |
0x1780, // 1780..17FF; KHMER
|
jaroslav@68
|
3661 |
0x1800, // 1800..1801; MONGOLIAN
|
jaroslav@68
|
3662 |
0x1802, // 1802..1803; COMMON
|
jaroslav@68
|
3663 |
0x1804, // 1804..1804; MONGOLIAN
|
jaroslav@68
|
3664 |
0x1805, // 1805..1805; COMMON
|
jaroslav@68
|
3665 |
0x1806, // 1806..18AF; MONGOLIAN
|
jaroslav@68
|
3666 |
0x18B0, // 18B0..18FF; CANADIAN_ABORIGINAL
|
jaroslav@68
|
3667 |
0x1900, // 1900..194F; LIMBU
|
jaroslav@68
|
3668 |
0x1950, // 1950..197F; TAI_LE
|
jaroslav@68
|
3669 |
0x1980, // 1980..19DF; NEW_TAI_LUE
|
jaroslav@68
|
3670 |
0x19E0, // 19E0..19FF; KHMER
|
jaroslav@68
|
3671 |
0x1A00, // 1A00..1A1F; BUGINESE
|
jaroslav@68
|
3672 |
0x1A20, // 1A20..1AFF; TAI_THAM
|
jaroslav@68
|
3673 |
0x1B00, // 1B00..1B7F; BALINESE
|
jaroslav@68
|
3674 |
0x1B80, // 1B80..1BBF; SUNDANESE
|
jaroslav@68
|
3675 |
0x1BC0, // 1BC0..1BFF; BATAK
|
jaroslav@68
|
3676 |
0x1C00, // 1C00..1C4F; LEPCHA
|
jaroslav@68
|
3677 |
0x1C50, // 1C50..1CCF; OL_CHIKI
|
jaroslav@68
|
3678 |
0x1CD0, // 1CD0..1CD2; INHERITED
|
jaroslav@68
|
3679 |
0x1CD3, // 1CD3..1CD3; COMMON
|
jaroslav@68
|
3680 |
0x1CD4, // 1CD4..1CE0; INHERITED
|
jaroslav@68
|
3681 |
0x1CE1, // 1CE1..1CE1; COMMON
|
jaroslav@68
|
3682 |
0x1CE2, // 1CE2..1CE8; INHERITED
|
jaroslav@68
|
3683 |
0x1CE9, // 1CE9..1CEC; COMMON
|
jaroslav@68
|
3684 |
0x1CED, // 1CED..1CED; INHERITED
|
jaroslav@68
|
3685 |
0x1CEE, // 1CEE..1CFF; COMMON
|
jaroslav@68
|
3686 |
0x1D00, // 1D00..1D25; LATIN
|
jaroslav@68
|
3687 |
0x1D26, // 1D26..1D2A; GREEK
|
jaroslav@68
|
3688 |
0x1D2B, // 1D2B..1D2B; CYRILLIC
|
jaroslav@68
|
3689 |
0x1D2C, // 1D2C..1D5C; LATIN
|
jaroslav@68
|
3690 |
0x1D5D, // 1D5D..1D61; GREEK
|
jaroslav@68
|
3691 |
0x1D62, // 1D62..1D65; LATIN
|
jaroslav@68
|
3692 |
0x1D66, // 1D66..1D6A; GREEK
|
jaroslav@68
|
3693 |
0x1D6B, // 1D6B..1D77; LATIN
|
jaroslav@68
|
3694 |
0x1D78, // 1D78..1D78; CYRILLIC
|
jaroslav@68
|
3695 |
0x1D79, // 1D79..1DBE; LATIN
|
jaroslav@68
|
3696 |
0x1DBF, // 1DBF..1DBF; GREEK
|
jaroslav@68
|
3697 |
0x1DC0, // 1DC0..1DFF; INHERITED
|
jaroslav@68
|
3698 |
0x1E00, // 1E00..1EFF; LATIN
|
jaroslav@68
|
3699 |
0x1F00, // 1F00..1FFF; GREEK
|
jaroslav@68
|
3700 |
0x2000, // 2000..200B; COMMON
|
jaroslav@68
|
3701 |
0x200C, // 200C..200D; INHERITED
|
jaroslav@68
|
3702 |
0x200E, // 200E..2070; COMMON
|
jaroslav@68
|
3703 |
0x2071, // 2071..2073; LATIN
|
jaroslav@68
|
3704 |
0x2074, // 2074..207E; COMMON
|
jaroslav@68
|
3705 |
0x207F, // 207F..207F; LATIN
|
jaroslav@68
|
3706 |
0x2080, // 2080..208F; COMMON
|
jaroslav@68
|
3707 |
0x2090, // 2090..209F; LATIN
|
jaroslav@68
|
3708 |
0x20A0, // 20A0..20CF; COMMON
|
jaroslav@68
|
3709 |
0x20D0, // 20D0..20FF; INHERITED
|
jaroslav@68
|
3710 |
0x2100, // 2100..2125; COMMON
|
jaroslav@68
|
3711 |
0x2126, // 2126..2126; GREEK
|
jaroslav@68
|
3712 |
0x2127, // 2127..2129; COMMON
|
jaroslav@68
|
3713 |
0x212A, // 212A..212B; LATIN
|
jaroslav@68
|
3714 |
0x212C, // 212C..2131; COMMON
|
jaroslav@68
|
3715 |
0x2132, // 2132..2132; LATIN
|
jaroslav@68
|
3716 |
0x2133, // 2133..214D; COMMON
|
jaroslav@68
|
3717 |
0x214E, // 214E..214E; LATIN
|
jaroslav@68
|
3718 |
0x214F, // 214F..215F; COMMON
|
jaroslav@68
|
3719 |
0x2160, // 2160..2188; LATIN
|
jaroslav@68
|
3720 |
0x2189, // 2189..27FF; COMMON
|
jaroslav@68
|
3721 |
0x2800, // 2800..28FF; BRAILLE
|
jaroslav@68
|
3722 |
0x2900, // 2900..2BFF; COMMON
|
jaroslav@68
|
3723 |
0x2C00, // 2C00..2C5F; GLAGOLITIC
|
jaroslav@68
|
3724 |
0x2C60, // 2C60..2C7F; LATIN
|
jaroslav@68
|
3725 |
0x2C80, // 2C80..2CFF; COPTIC
|
jaroslav@68
|
3726 |
0x2D00, // 2D00..2D2F; GEORGIAN
|
jaroslav@68
|
3727 |
0x2D30, // 2D30..2D7F; TIFINAGH
|
jaroslav@68
|
3728 |
0x2D80, // 2D80..2DDF; ETHIOPIC
|
jaroslav@68
|
3729 |
0x2DE0, // 2DE0..2DFF; CYRILLIC
|
jaroslav@68
|
3730 |
0x2E00, // 2E00..2E7F; COMMON
|
jaroslav@68
|
3731 |
0x2E80, // 2E80..2FEF; HAN
|
jaroslav@68
|
3732 |
0x2FF0, // 2FF0..3004; COMMON
|
jaroslav@68
|
3733 |
0x3005, // 3005..3005; HAN
|
jaroslav@68
|
3734 |
0x3006, // 3006..3006; COMMON
|
jaroslav@68
|
3735 |
0x3007, // 3007..3007; HAN
|
jaroslav@68
|
3736 |
0x3008, // 3008..3020; COMMON
|
jaroslav@68
|
3737 |
0x3021, // 3021..3029; HAN
|
jaroslav@68
|
3738 |
0x302A, // 302A..302D; INHERITED
|
jaroslav@68
|
3739 |
0x302E, // 302E..302F; HANGUL
|
jaroslav@68
|
3740 |
0x3030, // 3030..3037; COMMON
|
jaroslav@68
|
3741 |
0x3038, // 3038..303B; HAN
|
jaroslav@68
|
3742 |
0x303C, // 303C..3040; COMMON
|
jaroslav@68
|
3743 |
0x3041, // 3041..3098; HIRAGANA
|
jaroslav@68
|
3744 |
0x3099, // 3099..309A; INHERITED
|
jaroslav@68
|
3745 |
0x309B, // 309B..309C; COMMON
|
jaroslav@68
|
3746 |
0x309D, // 309D..309F; HIRAGANA
|
jaroslav@68
|
3747 |
0x30A0, // 30A0..30A0; COMMON
|
jaroslav@68
|
3748 |
0x30A1, // 30A1..30FA; KATAKANA
|
jaroslav@68
|
3749 |
0x30FB, // 30FB..30FC; COMMON
|
jaroslav@68
|
3750 |
0x30FD, // 30FD..3104; KATAKANA
|
jaroslav@68
|
3751 |
0x3105, // 3105..3130; BOPOMOFO
|
jaroslav@68
|
3752 |
0x3131, // 3131..318F; HANGUL
|
jaroslav@68
|
3753 |
0x3190, // 3190..319F; COMMON
|
jaroslav@68
|
3754 |
0x31A0, // 31A0..31BF; BOPOMOFO
|
jaroslav@68
|
3755 |
0x31C0, // 31C0..31EF; COMMON
|
jaroslav@68
|
3756 |
0x31F0, // 31F0..31FF; KATAKANA
|
jaroslav@68
|
3757 |
0x3200, // 3200..321F; HANGUL
|
jaroslav@68
|
3758 |
0x3220, // 3220..325F; COMMON
|
jaroslav@68
|
3759 |
0x3260, // 3260..327E; HANGUL
|
jaroslav@68
|
3760 |
0x327F, // 327F..32CF; COMMON
|
jaroslav@68
|
3761 |
0x32D0, // 32D0..3357; KATAKANA
|
jaroslav@68
|
3762 |
0x3358, // 3358..33FF; COMMON
|
jaroslav@68
|
3763 |
0x3400, // 3400..4DBF; HAN
|
jaroslav@68
|
3764 |
0x4DC0, // 4DC0..4DFF; COMMON
|
jaroslav@68
|
3765 |
0x4E00, // 4E00..9FFF; HAN
|
jaroslav@68
|
3766 |
0xA000, // A000..A4CF; YI
|
jaroslav@68
|
3767 |
0xA4D0, // A4D0..A4FF; LISU
|
jaroslav@68
|
3768 |
0xA500, // A500..A63F; VAI
|
jaroslav@68
|
3769 |
0xA640, // A640..A69F; CYRILLIC
|
jaroslav@68
|
3770 |
0xA6A0, // A6A0..A6FF; BAMUM
|
jaroslav@68
|
3771 |
0xA700, // A700..A721; COMMON
|
jaroslav@68
|
3772 |
0xA722, // A722..A787; LATIN
|
jaroslav@68
|
3773 |
0xA788, // A788..A78A; COMMON
|
jaroslav@68
|
3774 |
0xA78B, // A78B..A7FF; LATIN
|
jaroslav@68
|
3775 |
0xA800, // A800..A82F; SYLOTI_NAGRI
|
jaroslav@68
|
3776 |
0xA830, // A830..A83F; COMMON
|
jaroslav@68
|
3777 |
0xA840, // A840..A87F; PHAGS_PA
|
jaroslav@68
|
3778 |
0xA880, // A880..A8DF; SAURASHTRA
|
jaroslav@68
|
3779 |
0xA8E0, // A8E0..A8FF; DEVANAGARI
|
jaroslav@68
|
3780 |
0xA900, // A900..A92F; KAYAH_LI
|
jaroslav@68
|
3781 |
0xA930, // A930..A95F; REJANG
|
jaroslav@68
|
3782 |
0xA960, // A960..A97F; HANGUL
|
jaroslav@68
|
3783 |
0xA980, // A980..A9FF; JAVANESE
|
jaroslav@68
|
3784 |
0xAA00, // AA00..AA5F; CHAM
|
jaroslav@68
|
3785 |
0xAA60, // AA60..AA7F; MYANMAR
|
jaroslav@68
|
3786 |
0xAA80, // AA80..AB00; TAI_VIET
|
jaroslav@68
|
3787 |
0xAB01, // AB01..ABBF; ETHIOPIC
|
jaroslav@68
|
3788 |
0xABC0, // ABC0..ABFF; MEETEI_MAYEK
|
jaroslav@68
|
3789 |
0xAC00, // AC00..D7FB; HANGUL
|
jaroslav@68
|
3790 |
0xD7FC, // D7FC..F8FF; UNKNOWN
|
jaroslav@68
|
3791 |
0xF900, // F900..FAFF; HAN
|
jaroslav@68
|
3792 |
0xFB00, // FB00..FB12; LATIN
|
jaroslav@68
|
3793 |
0xFB13, // FB13..FB1C; ARMENIAN
|
jaroslav@68
|
3794 |
0xFB1D, // FB1D..FB4F; HEBREW
|
jaroslav@68
|
3795 |
0xFB50, // FB50..FD3D; ARABIC
|
jaroslav@68
|
3796 |
0xFD3E, // FD3E..FD4F; COMMON
|
jaroslav@68
|
3797 |
0xFD50, // FD50..FDFC; ARABIC
|
jaroslav@68
|
3798 |
0xFDFD, // FDFD..FDFF; COMMON
|
jaroslav@68
|
3799 |
0xFE00, // FE00..FE0F; INHERITED
|
jaroslav@68
|
3800 |
0xFE10, // FE10..FE1F; COMMON
|
jaroslav@68
|
3801 |
0xFE20, // FE20..FE2F; INHERITED
|
jaroslav@68
|
3802 |
0xFE30, // FE30..FE6F; COMMON
|
jaroslav@68
|
3803 |
0xFE70, // FE70..FEFE; ARABIC
|
jaroslav@68
|
3804 |
0xFEFF, // FEFF..FF20; COMMON
|
jaroslav@68
|
3805 |
0xFF21, // FF21..FF3A; LATIN
|
jaroslav@68
|
3806 |
0xFF3B, // FF3B..FF40; COMMON
|
jaroslav@68
|
3807 |
0xFF41, // FF41..FF5A; LATIN
|
jaroslav@68
|
3808 |
0xFF5B, // FF5B..FF65; COMMON
|
jaroslav@68
|
3809 |
0xFF66, // FF66..FF6F; KATAKANA
|
jaroslav@68
|
3810 |
0xFF70, // FF70..FF70; COMMON
|
jaroslav@68
|
3811 |
0xFF71, // FF71..FF9D; KATAKANA
|
jaroslav@68
|
3812 |
0xFF9E, // FF9E..FF9F; COMMON
|
jaroslav@68
|
3813 |
0xFFA0, // FFA0..FFDF; HANGUL
|
jaroslav@68
|
3814 |
0xFFE0, // FFE0..FFFF; COMMON
|
jaroslav@68
|
3815 |
0x10000, // 10000..100FF; LINEAR_B
|
jaroslav@68
|
3816 |
0x10100, // 10100..1013F; COMMON
|
jaroslav@68
|
3817 |
0x10140, // 10140..1018F; GREEK
|
jaroslav@68
|
3818 |
0x10190, // 10190..101FC; COMMON
|
jaroslav@68
|
3819 |
0x101FD, // 101FD..1027F; INHERITED
|
jaroslav@68
|
3820 |
0x10280, // 10280..1029F; LYCIAN
|
jaroslav@68
|
3821 |
0x102A0, // 102A0..102FF; CARIAN
|
jaroslav@68
|
3822 |
0x10300, // 10300..1032F; OLD_ITALIC
|
jaroslav@68
|
3823 |
0x10330, // 10330..1037F; GOTHIC
|
jaroslav@68
|
3824 |
0x10380, // 10380..1039F; UGARITIC
|
jaroslav@68
|
3825 |
0x103A0, // 103A0..103FF; OLD_PERSIAN
|
jaroslav@68
|
3826 |
0x10400, // 10400..1044F; DESERET
|
jaroslav@68
|
3827 |
0x10450, // 10450..1047F; SHAVIAN
|
jaroslav@68
|
3828 |
0x10480, // 10480..107FF; OSMANYA
|
jaroslav@68
|
3829 |
0x10800, // 10800..1083F; CYPRIOT
|
jaroslav@68
|
3830 |
0x10840, // 10840..108FF; IMPERIAL_ARAMAIC
|
jaroslav@68
|
3831 |
0x10900, // 10900..1091F; PHOENICIAN
|
jaroslav@68
|
3832 |
0x10920, // 10920..109FF; LYDIAN
|
jaroslav@68
|
3833 |
0x10A00, // 10A00..10A5F; KHAROSHTHI
|
jaroslav@68
|
3834 |
0x10A60, // 10A60..10AFF; OLD_SOUTH_ARABIAN
|
jaroslav@68
|
3835 |
0x10B00, // 10B00..10B3F; AVESTAN
|
jaroslav@68
|
3836 |
0x10B40, // 10B40..10B5F; INSCRIPTIONAL_PARTHIAN
|
jaroslav@68
|
3837 |
0x10B60, // 10B60..10BFF; INSCRIPTIONAL_PAHLAVI
|
jaroslav@68
|
3838 |
0x10C00, // 10C00..10E5F; OLD_TURKIC
|
jaroslav@68
|
3839 |
0x10E60, // 10E60..10FFF; ARABIC
|
jaroslav@68
|
3840 |
0x11000, // 11000..1107F; BRAHMI
|
jaroslav@68
|
3841 |
0x11080, // 11080..11FFF; KAITHI
|
jaroslav@68
|
3842 |
0x12000, // 12000..12FFF; CUNEIFORM
|
jaroslav@68
|
3843 |
0x13000, // 13000..167FF; EGYPTIAN_HIEROGLYPHS
|
jaroslav@68
|
3844 |
0x16800, // 16800..16A38; BAMUM
|
jaroslav@68
|
3845 |
0x1B000, // 1B000..1B000; KATAKANA
|
jaroslav@68
|
3846 |
0x1B001, // 1B001..1CFFF; HIRAGANA
|
jaroslav@68
|
3847 |
0x1D000, // 1D000..1D166; COMMON
|
jaroslav@68
|
3848 |
0x1D167, // 1D167..1D169; INHERITED
|
jaroslav@68
|
3849 |
0x1D16A, // 1D16A..1D17A; COMMON
|
jaroslav@68
|
3850 |
0x1D17B, // 1D17B..1D182; INHERITED
|
jaroslav@68
|
3851 |
0x1D183, // 1D183..1D184; COMMON
|
jaroslav@68
|
3852 |
0x1D185, // 1D185..1D18B; INHERITED
|
jaroslav@68
|
3853 |
0x1D18C, // 1D18C..1D1A9; COMMON
|
jaroslav@68
|
3854 |
0x1D1AA, // 1D1AA..1D1AD; INHERITED
|
jaroslav@68
|
3855 |
0x1D1AE, // 1D1AE..1D1FF; COMMON
|
jaroslav@68
|
3856 |
0x1D200, // 1D200..1D2FF; GREEK
|
jaroslav@68
|
3857 |
0x1D300, // 1D300..1F1FF; COMMON
|
jaroslav@68
|
3858 |
0x1F200, // 1F200..1F200; HIRAGANA
|
jaroslav@68
|
3859 |
0x1F201, // 1F210..1FFFF; COMMON
|
jaroslav@68
|
3860 |
0x20000, // 20000..E0000; HAN
|
jaroslav@68
|
3861 |
0xE0001, // E0001..E00FF; COMMON
|
jaroslav@68
|
3862 |
0xE0100, // E0100..E01EF; INHERITED
|
jaroslav@68
|
3863 |
0xE01F0 // E01F0..10FFFF; UNKNOWN
|
jaroslav@68
|
3864 |
|
jaroslav@68
|
3865 |
};
|
jaroslav@68
|
3866 |
|
jaroslav@68
|
3867 |
private static final UnicodeScript[] scripts = {
|
jaroslav@68
|
3868 |
COMMON,
|
jaroslav@68
|
3869 |
LATIN,
|
jaroslav@68
|
3870 |
COMMON,
|
jaroslav@68
|
3871 |
LATIN,
|
jaroslav@68
|
3872 |
COMMON,
|
jaroslav@68
|
3873 |
LATIN,
|
jaroslav@68
|
3874 |
COMMON,
|
jaroslav@68
|
3875 |
LATIN,
|
jaroslav@68
|
3876 |
COMMON,
|
jaroslav@68
|
3877 |
LATIN,
|
jaroslav@68
|
3878 |
COMMON,
|
jaroslav@68
|
3879 |
LATIN,
|
jaroslav@68
|
3880 |
COMMON,
|
jaroslav@68
|
3881 |
LATIN,
|
jaroslav@68
|
3882 |
COMMON,
|
jaroslav@68
|
3883 |
LATIN,
|
jaroslav@68
|
3884 |
COMMON,
|
jaroslav@68
|
3885 |
BOPOMOFO,
|
jaroslav@68
|
3886 |
COMMON,
|
jaroslav@68
|
3887 |
INHERITED,
|
jaroslav@68
|
3888 |
GREEK,
|
jaroslav@68
|
3889 |
COMMON,
|
jaroslav@68
|
3890 |
GREEK,
|
jaroslav@68
|
3891 |
COMMON,
|
jaroslav@68
|
3892 |
GREEK,
|
jaroslav@68
|
3893 |
COMMON,
|
jaroslav@68
|
3894 |
GREEK,
|
jaroslav@68
|
3895 |
COMMON,
|
jaroslav@68
|
3896 |
GREEK,
|
jaroslav@68
|
3897 |
COPTIC,
|
jaroslav@68
|
3898 |
GREEK,
|
jaroslav@68
|
3899 |
CYRILLIC,
|
jaroslav@68
|
3900 |
INHERITED,
|
jaroslav@68
|
3901 |
CYRILLIC,
|
jaroslav@68
|
3902 |
ARMENIAN,
|
jaroslav@68
|
3903 |
COMMON,
|
jaroslav@68
|
3904 |
ARMENIAN,
|
jaroslav@68
|
3905 |
HEBREW,
|
jaroslav@68
|
3906 |
ARABIC,
|
jaroslav@68
|
3907 |
COMMON,
|
jaroslav@68
|
3908 |
ARABIC,
|
jaroslav@68
|
3909 |
COMMON,
|
jaroslav@68
|
3910 |
ARABIC,
|
jaroslav@68
|
3911 |
COMMON,
|
jaroslav@68
|
3912 |
ARABIC,
|
jaroslav@68
|
3913 |
COMMON,
|
jaroslav@68
|
3914 |
ARABIC,
|
jaroslav@68
|
3915 |
INHERITED,
|
jaroslav@68
|
3916 |
ARABIC,
|
jaroslav@68
|
3917 |
INHERITED,
|
jaroslav@68
|
3918 |
COMMON,
|
jaroslav@68
|
3919 |
ARABIC,
|
jaroslav@68
|
3920 |
INHERITED,
|
jaroslav@68
|
3921 |
ARABIC,
|
jaroslav@68
|
3922 |
COMMON,
|
jaroslav@68
|
3923 |
ARABIC,
|
jaroslav@68
|
3924 |
SYRIAC,
|
jaroslav@68
|
3925 |
ARABIC,
|
jaroslav@68
|
3926 |
THAANA,
|
jaroslav@68
|
3927 |
NKO,
|
jaroslav@68
|
3928 |
SAMARITAN,
|
jaroslav@68
|
3929 |
MANDAIC,
|
jaroslav@68
|
3930 |
DEVANAGARI,
|
jaroslav@68
|
3931 |
INHERITED,
|
jaroslav@68
|
3932 |
DEVANAGARI,
|
jaroslav@68
|
3933 |
COMMON,
|
jaroslav@68
|
3934 |
DEVANAGARI,
|
jaroslav@68
|
3935 |
COMMON,
|
jaroslav@68
|
3936 |
DEVANAGARI,
|
jaroslav@68
|
3937 |
BENGALI,
|
jaroslav@68
|
3938 |
GURMUKHI,
|
jaroslav@68
|
3939 |
GUJARATI,
|
jaroslav@68
|
3940 |
ORIYA,
|
jaroslav@68
|
3941 |
TAMIL,
|
jaroslav@68
|
3942 |
TELUGU,
|
jaroslav@68
|
3943 |
KANNADA,
|
jaroslav@68
|
3944 |
MALAYALAM,
|
jaroslav@68
|
3945 |
SINHALA,
|
jaroslav@68
|
3946 |
THAI,
|
jaroslav@68
|
3947 |
COMMON,
|
jaroslav@68
|
3948 |
THAI,
|
jaroslav@68
|
3949 |
LAO,
|
jaroslav@68
|
3950 |
TIBETAN,
|
jaroslav@68
|
3951 |
COMMON,
|
jaroslav@68
|
3952 |
TIBETAN,
|
jaroslav@68
|
3953 |
MYANMAR,
|
jaroslav@68
|
3954 |
GEORGIAN,
|
jaroslav@68
|
3955 |
COMMON,
|
jaroslav@68
|
3956 |
GEORGIAN,
|
jaroslav@68
|
3957 |
HANGUL,
|
jaroslav@68
|
3958 |
ETHIOPIC,
|
jaroslav@68
|
3959 |
CHEROKEE,
|
jaroslav@68
|
3960 |
CANADIAN_ABORIGINAL,
|
jaroslav@68
|
3961 |
OGHAM,
|
jaroslav@68
|
3962 |
RUNIC,
|
jaroslav@68
|
3963 |
COMMON,
|
jaroslav@68
|
3964 |
RUNIC,
|
jaroslav@68
|
3965 |
TAGALOG,
|
jaroslav@68
|
3966 |
HANUNOO,
|
jaroslav@68
|
3967 |
COMMON,
|
jaroslav@68
|
3968 |
BUHID,
|
jaroslav@68
|
3969 |
TAGBANWA,
|
jaroslav@68
|
3970 |
KHMER,
|
jaroslav@68
|
3971 |
MONGOLIAN,
|
jaroslav@68
|
3972 |
COMMON,
|
jaroslav@68
|
3973 |
MONGOLIAN,
|
jaroslav@68
|
3974 |
COMMON,
|
jaroslav@68
|
3975 |
MONGOLIAN,
|
jaroslav@68
|
3976 |
CANADIAN_ABORIGINAL,
|
jaroslav@68
|
3977 |
LIMBU,
|
jaroslav@68
|
3978 |
TAI_LE,
|
jaroslav@68
|
3979 |
NEW_TAI_LUE,
|
jaroslav@68
|
3980 |
KHMER,
|
jaroslav@68
|
3981 |
BUGINESE,
|
jaroslav@68
|
3982 |
TAI_THAM,
|
jaroslav@68
|
3983 |
BALINESE,
|
jaroslav@68
|
3984 |
SUNDANESE,
|
jaroslav@68
|
3985 |
BATAK,
|
jaroslav@68
|
3986 |
LEPCHA,
|
jaroslav@68
|
3987 |
OL_CHIKI,
|
jaroslav@68
|
3988 |
INHERITED,
|
jaroslav@68
|
3989 |
COMMON,
|
jaroslav@68
|
3990 |
INHERITED,
|
jaroslav@68
|
3991 |
COMMON,
|
jaroslav@68
|
3992 |
INHERITED,
|
jaroslav@68
|
3993 |
COMMON,
|
jaroslav@68
|
3994 |
INHERITED,
|
jaroslav@68
|
3995 |
COMMON,
|
jaroslav@68
|
3996 |
LATIN,
|
jaroslav@68
|
3997 |
GREEK,
|
jaroslav@68
|
3998 |
CYRILLIC,
|
jaroslav@68
|
3999 |
LATIN,
|
jaroslav@68
|
4000 |
GREEK,
|
jaroslav@68
|
4001 |
LATIN,
|
jaroslav@68
|
4002 |
GREEK,
|
jaroslav@68
|
4003 |
LATIN,
|
jaroslav@68
|
4004 |
CYRILLIC,
|
jaroslav@68
|
4005 |
LATIN,
|
jaroslav@68
|
4006 |
GREEK,
|
jaroslav@68
|
4007 |
INHERITED,
|
jaroslav@68
|
4008 |
LATIN,
|
jaroslav@68
|
4009 |
GREEK,
|
jaroslav@68
|
4010 |
COMMON,
|
jaroslav@68
|
4011 |
INHERITED,
|
jaroslav@68
|
4012 |
COMMON,
|
jaroslav@68
|
4013 |
LATIN,
|
jaroslav@68
|
4014 |
COMMON,
|
jaroslav@68
|
4015 |
LATIN,
|
jaroslav@68
|
4016 |
COMMON,
|
jaroslav@68
|
4017 |
LATIN,
|
jaroslav@68
|
4018 |
COMMON,
|
jaroslav@68
|
4019 |
INHERITED,
|
jaroslav@68
|
4020 |
COMMON,
|
jaroslav@68
|
4021 |
GREEK,
|
jaroslav@68
|
4022 |
COMMON,
|
jaroslav@68
|
4023 |
LATIN,
|
jaroslav@68
|
4024 |
COMMON,
|
jaroslav@68
|
4025 |
LATIN,
|
jaroslav@68
|
4026 |
COMMON,
|
jaroslav@68
|
4027 |
LATIN,
|
jaroslav@68
|
4028 |
COMMON,
|
jaroslav@68
|
4029 |
LATIN,
|
jaroslav@68
|
4030 |
COMMON,
|
jaroslav@68
|
4031 |
BRAILLE,
|
jaroslav@68
|
4032 |
COMMON,
|
jaroslav@68
|
4033 |
GLAGOLITIC,
|
jaroslav@68
|
4034 |
LATIN,
|
jaroslav@68
|
4035 |
COPTIC,
|
jaroslav@68
|
4036 |
GEORGIAN,
|
jaroslav@68
|
4037 |
TIFINAGH,
|
jaroslav@68
|
4038 |
ETHIOPIC,
|
jaroslav@68
|
4039 |
CYRILLIC,
|
jaroslav@68
|
4040 |
COMMON,
|
jaroslav@68
|
4041 |
HAN,
|
jaroslav@68
|
4042 |
COMMON,
|
jaroslav@68
|
4043 |
HAN,
|
jaroslav@68
|
4044 |
COMMON,
|
jaroslav@68
|
4045 |
HAN,
|
jaroslav@68
|
4046 |
COMMON,
|
jaroslav@68
|
4047 |
HAN,
|
jaroslav@68
|
4048 |
INHERITED,
|
jaroslav@68
|
4049 |
HANGUL,
|
jaroslav@68
|
4050 |
COMMON,
|
jaroslav@68
|
4051 |
HAN,
|
jaroslav@68
|
4052 |
COMMON,
|
jaroslav@68
|
4053 |
HIRAGANA,
|
jaroslav@68
|
4054 |
INHERITED,
|
jaroslav@68
|
4055 |
COMMON,
|
jaroslav@68
|
4056 |
HIRAGANA,
|
jaroslav@68
|
4057 |
COMMON,
|
jaroslav@68
|
4058 |
KATAKANA,
|
jaroslav@68
|
4059 |
COMMON,
|
jaroslav@68
|
4060 |
KATAKANA,
|
jaroslav@68
|
4061 |
BOPOMOFO,
|
jaroslav@68
|
4062 |
HANGUL,
|
jaroslav@68
|
4063 |
COMMON,
|
jaroslav@68
|
4064 |
BOPOMOFO,
|
jaroslav@68
|
4065 |
COMMON,
|
jaroslav@68
|
4066 |
KATAKANA,
|
jaroslav@68
|
4067 |
HANGUL,
|
jaroslav@68
|
4068 |
COMMON,
|
jaroslav@68
|
4069 |
HANGUL,
|
jaroslav@68
|
4070 |
COMMON,
|
jaroslav@68
|
4071 |
KATAKANA,
|
jaroslav@68
|
4072 |
COMMON,
|
jaroslav@68
|
4073 |
HAN,
|
jaroslav@68
|
4074 |
COMMON,
|
jaroslav@68
|
4075 |
HAN,
|
jaroslav@68
|
4076 |
YI,
|
jaroslav@68
|
4077 |
LISU,
|
jaroslav@68
|
4078 |
VAI,
|
jaroslav@68
|
4079 |
CYRILLIC,
|
jaroslav@68
|
4080 |
BAMUM,
|
jaroslav@68
|
4081 |
COMMON,
|
jaroslav@68
|
4082 |
LATIN,
|
jaroslav@68
|
4083 |
COMMON,
|
jaroslav@68
|
4084 |
LATIN,
|
jaroslav@68
|
4085 |
SYLOTI_NAGRI,
|
jaroslav@68
|
4086 |
COMMON,
|
jaroslav@68
|
4087 |
PHAGS_PA,
|
jaroslav@68
|
4088 |
SAURASHTRA,
|
jaroslav@68
|
4089 |
DEVANAGARI,
|
jaroslav@68
|
4090 |
KAYAH_LI,
|
jaroslav@68
|
4091 |
REJANG,
|
jaroslav@68
|
4092 |
HANGUL,
|
jaroslav@68
|
4093 |
JAVANESE,
|
jaroslav@68
|
4094 |
CHAM,
|
jaroslav@68
|
4095 |
MYANMAR,
|
jaroslav@68
|
4096 |
TAI_VIET,
|
jaroslav@68
|
4097 |
ETHIOPIC,
|
jaroslav@68
|
4098 |
MEETEI_MAYEK,
|
jaroslav@68
|
4099 |
HANGUL,
|
jaroslav@68
|
4100 |
UNKNOWN,
|
jaroslav@68
|
4101 |
HAN,
|
jaroslav@68
|
4102 |
LATIN,
|
jaroslav@68
|
4103 |
ARMENIAN,
|
jaroslav@68
|
4104 |
HEBREW,
|
jaroslav@68
|
4105 |
ARABIC,
|
jaroslav@68
|
4106 |
COMMON,
|
jaroslav@68
|
4107 |
ARABIC,
|
jaroslav@68
|
4108 |
COMMON,
|
jaroslav@68
|
4109 |
INHERITED,
|
jaroslav@68
|
4110 |
COMMON,
|
jaroslav@68
|
4111 |
INHERITED,
|
jaroslav@68
|
4112 |
COMMON,
|
jaroslav@68
|
4113 |
ARABIC,
|
jaroslav@68
|
4114 |
COMMON,
|
jaroslav@68
|
4115 |
LATIN,
|
jaroslav@68
|
4116 |
COMMON,
|
jaroslav@68
|
4117 |
LATIN,
|
jaroslav@68
|
4118 |
COMMON,
|
jaroslav@68
|
4119 |
KATAKANA,
|
jaroslav@68
|
4120 |
COMMON,
|
jaroslav@68
|
4121 |
KATAKANA,
|
jaroslav@68
|
4122 |
COMMON,
|
jaroslav@68
|
4123 |
HANGUL,
|
jaroslav@68
|
4124 |
COMMON,
|
jaroslav@68
|
4125 |
LINEAR_B,
|
jaroslav@68
|
4126 |
COMMON,
|
jaroslav@68
|
4127 |
GREEK,
|
jaroslav@68
|
4128 |
COMMON,
|
jaroslav@68
|
4129 |
INHERITED,
|
jaroslav@68
|
4130 |
LYCIAN,
|
jaroslav@68
|
4131 |
CARIAN,
|
jaroslav@68
|
4132 |
OLD_ITALIC,
|
jaroslav@68
|
4133 |
GOTHIC,
|
jaroslav@68
|
4134 |
UGARITIC,
|
jaroslav@68
|
4135 |
OLD_PERSIAN,
|
jaroslav@68
|
4136 |
DESERET,
|
jaroslav@68
|
4137 |
SHAVIAN,
|
jaroslav@68
|
4138 |
OSMANYA,
|
jaroslav@68
|
4139 |
CYPRIOT,
|
jaroslav@68
|
4140 |
IMPERIAL_ARAMAIC,
|
jaroslav@68
|
4141 |
PHOENICIAN,
|
jaroslav@68
|
4142 |
LYDIAN,
|
jaroslav@68
|
4143 |
KHAROSHTHI,
|
jaroslav@68
|
4144 |
OLD_SOUTH_ARABIAN,
|
jaroslav@68
|
4145 |
AVESTAN,
|
jaroslav@68
|
4146 |
INSCRIPTIONAL_PARTHIAN,
|
jaroslav@68
|
4147 |
INSCRIPTIONAL_PAHLAVI,
|
jaroslav@68
|
4148 |
OLD_TURKIC,
|
jaroslav@68
|
4149 |
ARABIC,
|
jaroslav@68
|
4150 |
BRAHMI,
|
jaroslav@68
|
4151 |
KAITHI,
|
jaroslav@68
|
4152 |
CUNEIFORM,
|
jaroslav@68
|
4153 |
EGYPTIAN_HIEROGLYPHS,
|
jaroslav@68
|
4154 |
BAMUM,
|
jaroslav@68
|
4155 |
KATAKANA,
|
jaroslav@68
|
4156 |
HIRAGANA,
|
jaroslav@68
|
4157 |
COMMON,
|
jaroslav@68
|
4158 |
INHERITED,
|
jaroslav@68
|
4159 |
COMMON,
|
jaroslav@68
|
4160 |
INHERITED,
|
jaroslav@68
|
4161 |
COMMON,
|
jaroslav@68
|
4162 |
INHERITED,
|
jaroslav@68
|
4163 |
COMMON,
|
jaroslav@68
|
4164 |
INHERITED,
|
jaroslav@68
|
4165 |
COMMON,
|
jaroslav@68
|
4166 |
GREEK,
|
jaroslav@68
|
4167 |
COMMON,
|
jaroslav@68
|
4168 |
HIRAGANA,
|
jaroslav@68
|
4169 |
COMMON,
|
jaroslav@68
|
4170 |
HAN,
|
jaroslav@68
|
4171 |
COMMON,
|
jaroslav@68
|
4172 |
INHERITED,
|
jaroslav@68
|
4173 |
UNKNOWN
|
jaroslav@68
|
4174 |
};
|
jaroslav@68
|
4175 |
|
jaroslav@68
|
4176 |
private static HashMap<String, Character.UnicodeScript> aliases;
|
jaroslav@68
|
4177 |
static {
|
jaroslav@68
|
4178 |
aliases = new HashMap<>(128);
|
jaroslav@68
|
4179 |
aliases.put("ARAB", ARABIC);
|
jaroslav@68
|
4180 |
aliases.put("ARMI", IMPERIAL_ARAMAIC);
|
jaroslav@68
|
4181 |
aliases.put("ARMN", ARMENIAN);
|
jaroslav@68
|
4182 |
aliases.put("AVST", AVESTAN);
|
jaroslav@68
|
4183 |
aliases.put("BALI", BALINESE);
|
jaroslav@68
|
4184 |
aliases.put("BAMU", BAMUM);
|
jaroslav@68
|
4185 |
aliases.put("BATK", BATAK);
|
jaroslav@68
|
4186 |
aliases.put("BENG", BENGALI);
|
jaroslav@68
|
4187 |
aliases.put("BOPO", BOPOMOFO);
|
jaroslav@68
|
4188 |
aliases.put("BRAI", BRAILLE);
|
jaroslav@68
|
4189 |
aliases.put("BRAH", BRAHMI);
|
jaroslav@68
|
4190 |
aliases.put("BUGI", BUGINESE);
|
jaroslav@68
|
4191 |
aliases.put("BUHD", BUHID);
|
jaroslav@68
|
4192 |
aliases.put("CANS", CANADIAN_ABORIGINAL);
|
jaroslav@68
|
4193 |
aliases.put("CARI", CARIAN);
|
jaroslav@68
|
4194 |
aliases.put("CHAM", CHAM);
|
jaroslav@68
|
4195 |
aliases.put("CHER", CHEROKEE);
|
jaroslav@68
|
4196 |
aliases.put("COPT", COPTIC);
|
jaroslav@68
|
4197 |
aliases.put("CPRT", CYPRIOT);
|
jaroslav@68
|
4198 |
aliases.put("CYRL", CYRILLIC);
|
jaroslav@68
|
4199 |
aliases.put("DEVA", DEVANAGARI);
|
jaroslav@68
|
4200 |
aliases.put("DSRT", DESERET);
|
jaroslav@68
|
4201 |
aliases.put("EGYP", EGYPTIAN_HIEROGLYPHS);
|
jaroslav@68
|
4202 |
aliases.put("ETHI", ETHIOPIC);
|
jaroslav@68
|
4203 |
aliases.put("GEOR", GEORGIAN);
|
jaroslav@68
|
4204 |
aliases.put("GLAG", GLAGOLITIC);
|
jaroslav@68
|
4205 |
aliases.put("GOTH", GOTHIC);
|
jaroslav@68
|
4206 |
aliases.put("GREK", GREEK);
|
jaroslav@68
|
4207 |
aliases.put("GUJR", GUJARATI);
|
jaroslav@68
|
4208 |
aliases.put("GURU", GURMUKHI);
|
jaroslav@68
|
4209 |
aliases.put("HANG", HANGUL);
|
jaroslav@68
|
4210 |
aliases.put("HANI", HAN);
|
jaroslav@68
|
4211 |
aliases.put("HANO", HANUNOO);
|
jaroslav@68
|
4212 |
aliases.put("HEBR", HEBREW);
|
jaroslav@68
|
4213 |
aliases.put("HIRA", HIRAGANA);
|
jaroslav@68
|
4214 |
// it appears we don't have the KATAKANA_OR_HIRAGANA
|
jaroslav@68
|
4215 |
//aliases.put("HRKT", KATAKANA_OR_HIRAGANA);
|
jaroslav@68
|
4216 |
aliases.put("ITAL", OLD_ITALIC);
|
jaroslav@68
|
4217 |
aliases.put("JAVA", JAVANESE);
|
jaroslav@68
|
4218 |
aliases.put("KALI", KAYAH_LI);
|
jaroslav@68
|
4219 |
aliases.put("KANA", KATAKANA);
|
jaroslav@68
|
4220 |
aliases.put("KHAR", KHAROSHTHI);
|
jaroslav@68
|
4221 |
aliases.put("KHMR", KHMER);
|
jaroslav@68
|
4222 |
aliases.put("KNDA", KANNADA);
|
jaroslav@68
|
4223 |
aliases.put("KTHI", KAITHI);
|
jaroslav@68
|
4224 |
aliases.put("LANA", TAI_THAM);
|
jaroslav@68
|
4225 |
aliases.put("LAOO", LAO);
|
jaroslav@68
|
4226 |
aliases.put("LATN", LATIN);
|
jaroslav@68
|
4227 |
aliases.put("LEPC", LEPCHA);
|
jaroslav@68
|
4228 |
aliases.put("LIMB", LIMBU);
|
jaroslav@68
|
4229 |
aliases.put("LINB", LINEAR_B);
|
jaroslav@68
|
4230 |
aliases.put("LISU", LISU);
|
jaroslav@68
|
4231 |
aliases.put("LYCI", LYCIAN);
|
jaroslav@68
|
4232 |
aliases.put("LYDI", LYDIAN);
|
jaroslav@68
|
4233 |
aliases.put("MAND", MANDAIC);
|
jaroslav@68
|
4234 |
aliases.put("MLYM", MALAYALAM);
|
jaroslav@68
|
4235 |
aliases.put("MONG", MONGOLIAN);
|
jaroslav@68
|
4236 |
aliases.put("MTEI", MEETEI_MAYEK);
|
jaroslav@68
|
4237 |
aliases.put("MYMR", MYANMAR);
|
jaroslav@68
|
4238 |
aliases.put("NKOO", NKO);
|
jaroslav@68
|
4239 |
aliases.put("OGAM", OGHAM);
|
jaroslav@68
|
4240 |
aliases.put("OLCK", OL_CHIKI);
|
jaroslav@68
|
4241 |
aliases.put("ORKH", OLD_TURKIC);
|
jaroslav@68
|
4242 |
aliases.put("ORYA", ORIYA);
|
jaroslav@68
|
4243 |
aliases.put("OSMA", OSMANYA);
|
jaroslav@68
|
4244 |
aliases.put("PHAG", PHAGS_PA);
|
jaroslav@68
|
4245 |
aliases.put("PHLI", INSCRIPTIONAL_PAHLAVI);
|
jaroslav@68
|
4246 |
aliases.put("PHNX", PHOENICIAN);
|
jaroslav@68
|
4247 |
aliases.put("PRTI", INSCRIPTIONAL_PARTHIAN);
|
jaroslav@68
|
4248 |
aliases.put("RJNG", REJANG);
|
jaroslav@68
|
4249 |
aliases.put("RUNR", RUNIC);
|
jaroslav@68
|
4250 |
aliases.put("SAMR", SAMARITAN);
|
jaroslav@68
|
4251 |
aliases.put("SARB", OLD_SOUTH_ARABIAN);
|
jaroslav@68
|
4252 |
aliases.put("SAUR", SAURASHTRA);
|
jaroslav@68
|
4253 |
aliases.put("SHAW", SHAVIAN);
|
jaroslav@68
|
4254 |
aliases.put("SINH", SINHALA);
|
jaroslav@68
|
4255 |
aliases.put("SUND", SUNDANESE);
|
jaroslav@68
|
4256 |
aliases.put("SYLO", SYLOTI_NAGRI);
|
jaroslav@68
|
4257 |
aliases.put("SYRC", SYRIAC);
|
jaroslav@68
|
4258 |
aliases.put("TAGB", TAGBANWA);
|
jaroslav@68
|
4259 |
aliases.put("TALE", TAI_LE);
|
jaroslav@68
|
4260 |
aliases.put("TALU", NEW_TAI_LUE);
|
jaroslav@68
|
4261 |
aliases.put("TAML", TAMIL);
|
jaroslav@68
|
4262 |
aliases.put("TAVT", TAI_VIET);
|
jaroslav@68
|
4263 |
aliases.put("TELU", TELUGU);
|
jaroslav@68
|
4264 |
aliases.put("TFNG", TIFINAGH);
|
jaroslav@68
|
4265 |
aliases.put("TGLG", TAGALOG);
|
jaroslav@68
|
4266 |
aliases.put("THAA", THAANA);
|
jaroslav@68
|
4267 |
aliases.put("THAI", THAI);
|
jaroslav@68
|
4268 |
aliases.put("TIBT", TIBETAN);
|
jaroslav@68
|
4269 |
aliases.put("UGAR", UGARITIC);
|
jaroslav@68
|
4270 |
aliases.put("VAII", VAI);
|
jaroslav@68
|
4271 |
aliases.put("XPEO", OLD_PERSIAN);
|
jaroslav@68
|
4272 |
aliases.put("XSUX", CUNEIFORM);
|
jaroslav@68
|
4273 |
aliases.put("YIII", YI);
|
jaroslav@68
|
4274 |
aliases.put("ZINH", INHERITED);
|
jaroslav@68
|
4275 |
aliases.put("ZYYY", COMMON);
|
jaroslav@68
|
4276 |
aliases.put("ZZZZ", UNKNOWN);
|
jaroslav@68
|
4277 |
}
|
jaroslav@68
|
4278 |
|
jaroslav@68
|
4279 |
/**
|
jaroslav@68
|
4280 |
* Returns the enum constant representing the Unicode script of which
|
jaroslav@68
|
4281 |
* the given character (Unicode code point) is assigned to.
|
jaroslav@68
|
4282 |
*
|
jaroslav@68
|
4283 |
* @param codePoint the character (Unicode code point) in question.
|
jaroslav@68
|
4284 |
* @return The {@code UnicodeScript} constant representing the
|
jaroslav@68
|
4285 |
* Unicode script of which this character is assigned to.
|
jaroslav@68
|
4286 |
*
|
jaroslav@68
|
4287 |
* @exception IllegalArgumentException if the specified
|
jaroslav@68
|
4288 |
* {@code codePoint} is an invalid Unicode code point.
|
jaroslav@68
|
4289 |
* @see Character#isValidCodePoint(int)
|
jaroslav@68
|
4290 |
*
|
jaroslav@68
|
4291 |
*/
|
jaroslav@68
|
4292 |
public static UnicodeScript of(int codePoint) {
|
jaroslav@68
|
4293 |
if (!isValidCodePoint(codePoint))
|
jaroslav@68
|
4294 |
throw new IllegalArgumentException();
|
jaroslav@68
|
4295 |
int type = getType(codePoint);
|
jaroslav@68
|
4296 |
// leave SURROGATE and PRIVATE_USE for table lookup
|
jaroslav@68
|
4297 |
if (type == UNASSIGNED)
|
jaroslav@68
|
4298 |
return UNKNOWN;
|
jaroslav@68
|
4299 |
int index = Arrays.binarySearch(scriptStarts, codePoint);
|
jaroslav@68
|
4300 |
if (index < 0)
|
jaroslav@68
|
4301 |
index = -index - 2;
|
jaroslav@68
|
4302 |
return scripts[index];
|
jaroslav@68
|
4303 |
}
|
jaroslav@68
|
4304 |
|
jaroslav@68
|
4305 |
/**
|
jaroslav@68
|
4306 |
* Returns the UnicodeScript constant with the given Unicode script
|
jaroslav@68
|
4307 |
* name or the script name alias. Script names and their aliases are
|
jaroslav@68
|
4308 |
* determined by The Unicode Standard. The files Scripts<version>.txt
|
jaroslav@68
|
4309 |
* and PropertyValueAliases<version>.txt define script names
|
jaroslav@68
|
4310 |
* and the script name aliases for a particular version of the
|
jaroslav@68
|
4311 |
* standard. The {@link Character} class specifies the version of
|
jaroslav@68
|
4312 |
* the standard that it supports.
|
jaroslav@68
|
4313 |
* <p>
|
jaroslav@68
|
4314 |
* Character case is ignored for all of the valid script names.
|
jaroslav@68
|
4315 |
* The en_US locale's case mapping rules are used to provide
|
jaroslav@68
|
4316 |
* case-insensitive string comparisons for script name validation.
|
jaroslav@68
|
4317 |
* <p>
|
jaroslav@68
|
4318 |
*
|
jaroslav@68
|
4319 |
* @param scriptName A {@code UnicodeScript} name.
|
jaroslav@68
|
4320 |
* @return The {@code UnicodeScript} constant identified
|
jaroslav@68
|
4321 |
* by {@code scriptName}
|
jaroslav@68
|
4322 |
* @throws IllegalArgumentException if {@code scriptName} is an
|
jaroslav@68
|
4323 |
* invalid name
|
jaroslav@68
|
4324 |
* @throws NullPointerException if {@code scriptName} is null
|
jaroslav@68
|
4325 |
*/
|
jaroslav@68
|
4326 |
public static final UnicodeScript forName(String scriptName) {
|
jaroslav@68
|
4327 |
scriptName = scriptName.toUpperCase(Locale.ENGLISH);
|
jaroslav@68
|
4328 |
//.replace(' ', '_'));
|
jaroslav@68
|
4329 |
UnicodeScript sc = aliases.get(scriptName);
|
jaroslav@68
|
4330 |
if (sc != null)
|
jaroslav@68
|
4331 |
return sc;
|
jaroslav@68
|
4332 |
return valueOf(scriptName);
|
jaroslav@68
|
4333 |
}
|
jaroslav@68
|
4334 |
}
|
jaroslav@68
|
4335 |
|
jaroslav@68
|
4336 |
/**
|
jaroslav@68
|
4337 |
* The value of the {@code Character}.
|
jaroslav@68
|
4338 |
*
|
jaroslav@68
|
4339 |
* @serial
|
jaroslav@68
|
4340 |
*/
|
jaroslav@68
|
4341 |
private final char value;
|
jaroslav@68
|
4342 |
|
jaroslav@68
|
4343 |
/** use serialVersionUID from JDK 1.0.2 for interoperability */
|
jaroslav@68
|
4344 |
private static final long serialVersionUID = 3786198910865385080L;
|
jaroslav@68
|
4345 |
|
jaroslav@68
|
4346 |
/**
|
jaroslav@68
|
4347 |
* Constructs a newly allocated {@code Character} object that
|
jaroslav@68
|
4348 |
* represents the specified {@code char} value.
|
jaroslav@68
|
4349 |
*
|
jaroslav@68
|
4350 |
* @param value the value to be represented by the
|
jaroslav@68
|
4351 |
* {@code Character} object.
|
jaroslav@68
|
4352 |
*/
|
jaroslav@68
|
4353 |
public Character(char value) {
|
jaroslav@68
|
4354 |
this.value = value;
|
jaroslav@68
|
4355 |
}
|
jaroslav@68
|
4356 |
|
jaroslav@68
|
4357 |
private static class CharacterCache {
|
jaroslav@68
|
4358 |
private CharacterCache(){}
|
jaroslav@68
|
4359 |
|
jaroslav@68
|
4360 |
static final Character cache[] = new Character[127 + 1];
|
jaroslav@68
|
4361 |
|
jaroslav@68
|
4362 |
static {
|
jaroslav@68
|
4363 |
for (int i = 0; i < cache.length; i++)
|
jaroslav@68
|
4364 |
cache[i] = new Character((char)i);
|
jaroslav@68
|
4365 |
}
|
jaroslav@68
|
4366 |
}
|
jaroslav@68
|
4367 |
|
jaroslav@68
|
4368 |
/**
|
jaroslav@68
|
4369 |
* Returns a <tt>Character</tt> instance representing the specified
|
jaroslav@68
|
4370 |
* <tt>char</tt> value.
|
jaroslav@68
|
4371 |
* If a new <tt>Character</tt> instance is not required, this method
|
jaroslav@68
|
4372 |
* should generally be used in preference to the constructor
|
jaroslav@68
|
4373 |
* {@link #Character(char)}, as this method is likely to yield
|
jaroslav@68
|
4374 |
* significantly better space and time performance by caching
|
jaroslav@68
|
4375 |
* frequently requested values.
|
jaroslav@68
|
4376 |
*
|
jaroslav@68
|
4377 |
* This method will always cache values in the range {@code
|
jaroslav@68
|
4378 |
* '\u005Cu0000'} to {@code '\u005Cu007F'}, inclusive, and may
|
jaroslav@68
|
4379 |
* cache other values outside of this range.
|
jaroslav@68
|
4380 |
*
|
jaroslav@68
|
4381 |
* @param c a char value.
|
jaroslav@68
|
4382 |
* @return a <tt>Character</tt> instance representing <tt>c</tt>.
|
jaroslav@68
|
4383 |
* @since 1.5
|
jaroslav@68
|
4384 |
*/
|
jaroslav@68
|
4385 |
public static Character valueOf(char c) {
|
jaroslav@68
|
4386 |
if (c <= 127) { // must cache
|
jaroslav@68
|
4387 |
return CharacterCache.cache[(int)c];
|
jaroslav@68
|
4388 |
}
|
jaroslav@68
|
4389 |
return new Character(c);
|
jaroslav@68
|
4390 |
}
|
jaroslav@68
|
4391 |
|
jaroslav@68
|
4392 |
/**
|
jaroslav@68
|
4393 |
* Returns the value of this {@code Character} object.
|
jaroslav@68
|
4394 |
* @return the primitive {@code char} value represented by
|
jaroslav@68
|
4395 |
* this object.
|
jaroslav@68
|
4396 |
*/
|
jaroslav@68
|
4397 |
public char charValue() {
|
jaroslav@68
|
4398 |
return value;
|
jaroslav@68
|
4399 |
}
|
jaroslav@68
|
4400 |
|
jaroslav@68
|
4401 |
/**
|
jaroslav@68
|
4402 |
* Returns a hash code for this {@code Character}; equal to the result
|
jaroslav@68
|
4403 |
* of invoking {@code charValue()}.
|
jaroslav@68
|
4404 |
*
|
jaroslav@68
|
4405 |
* @return a hash code value for this {@code Character}
|
jaroslav@68
|
4406 |
*/
|
jaroslav@68
|
4407 |
public int hashCode() {
|
jaroslav@68
|
4408 |
return (int)value;
|
jaroslav@68
|
4409 |
}
|
jaroslav@68
|
4410 |
|
jaroslav@68
|
4411 |
/**
|
jaroslav@68
|
4412 |
* Compares this object against the specified object.
|
jaroslav@68
|
4413 |
* The result is {@code true} if and only if the argument is not
|
jaroslav@68
|
4414 |
* {@code null} and is a {@code Character} object that
|
jaroslav@68
|
4415 |
* represents the same {@code char} value as this object.
|
jaroslav@68
|
4416 |
*
|
jaroslav@68
|
4417 |
* @param obj the object to compare with.
|
jaroslav@68
|
4418 |
* @return {@code true} if the objects are the same;
|
jaroslav@68
|
4419 |
* {@code false} otherwise.
|
jaroslav@68
|
4420 |
*/
|
jaroslav@68
|
4421 |
public boolean equals(Object obj) {
|
jaroslav@68
|
4422 |
if (obj instanceof Character) {
|
jaroslav@68
|
4423 |
return value == ((Character)obj).charValue();
|
jaroslav@68
|
4424 |
}
|
jaroslav@68
|
4425 |
return false;
|
jaroslav@68
|
4426 |
}
|
jaroslav@68
|
4427 |
|
jaroslav@68
|
4428 |
/**
|
jaroslav@68
|
4429 |
* Returns a {@code String} object representing this
|
jaroslav@68
|
4430 |
* {@code Character}'s value. The result is a string of
|
jaroslav@68
|
4431 |
* length 1 whose sole component is the primitive
|
jaroslav@68
|
4432 |
* {@code char} value represented by this
|
jaroslav@68
|
4433 |
* {@code Character} object.
|
jaroslav@68
|
4434 |
*
|
jaroslav@68
|
4435 |
* @return a string representation of this object.
|
jaroslav@68
|
4436 |
*/
|
jaroslav@68
|
4437 |
public String toString() {
|
jaroslav@68
|
4438 |
char buf[] = {value};
|
jaroslav@68
|
4439 |
return String.valueOf(buf);
|
jaroslav@68
|
4440 |
}
|
jaroslav@68
|
4441 |
|
jaroslav@68
|
4442 |
/**
|
jaroslav@68
|
4443 |
* Returns a {@code String} object representing the
|
jaroslav@68
|
4444 |
* specified {@code char}. The result is a string of length
|
jaroslav@68
|
4445 |
* 1 consisting solely of the specified {@code char}.
|
jaroslav@68
|
4446 |
*
|
jaroslav@68
|
4447 |
* @param c the {@code char} to be converted
|
jaroslav@68
|
4448 |
* @return the string representation of the specified {@code char}
|
jaroslav@68
|
4449 |
* @since 1.4
|
jaroslav@68
|
4450 |
*/
|
jaroslav@68
|
4451 |
public static String toString(char c) {
|
jaroslav@68
|
4452 |
return String.valueOf(c);
|
jaroslav@68
|
4453 |
}
|
jaroslav@68
|
4454 |
|
jaroslav@68
|
4455 |
/**
|
jaroslav@68
|
4456 |
* Determines whether the specified code point is a valid
|
jaroslav@68
|
4457 |
* <a href="http://www.unicode.org/glossary/#code_point">
|
jaroslav@68
|
4458 |
* Unicode code point value</a>.
|
jaroslav@68
|
4459 |
*
|
jaroslav@68
|
4460 |
* @param codePoint the Unicode code point to be tested
|
jaroslav@68
|
4461 |
* @return {@code true} if the specified code point value is between
|
jaroslav@68
|
4462 |
* {@link #MIN_CODE_POINT} and
|
jaroslav@68
|
4463 |
* {@link #MAX_CODE_POINT} inclusive;
|
jaroslav@68
|
4464 |
* {@code false} otherwise.
|
jaroslav@68
|
4465 |
* @since 1.5
|
jaroslav@68
|
4466 |
*/
|
jaroslav@68
|
4467 |
public static boolean isValidCodePoint(int codePoint) {
|
jaroslav@68
|
4468 |
// Optimized form of:
|
jaroslav@68
|
4469 |
// codePoint >= MIN_CODE_POINT && codePoint <= MAX_CODE_POINT
|
jaroslav@68
|
4470 |
int plane = codePoint >>> 16;
|
jaroslav@68
|
4471 |
return plane < ((MAX_CODE_POINT + 1) >>> 16);
|
jaroslav@68
|
4472 |
}
|
jaroslav@68
|
4473 |
|
jaroslav@68
|
4474 |
/**
|
jaroslav@68
|
4475 |
* Determines whether the specified character (Unicode code point)
|
jaroslav@68
|
4476 |
* is in the <a href="#BMP">Basic Multilingual Plane (BMP)</a>.
|
jaroslav@68
|
4477 |
* Such code points can be represented using a single {@code char}.
|
jaroslav@68
|
4478 |
*
|
jaroslav@68
|
4479 |
* @param codePoint the character (Unicode code point) to be tested
|
jaroslav@68
|
4480 |
* @return {@code true} if the specified code point is between
|
jaroslav@68
|
4481 |
* {@link #MIN_VALUE} and {@link #MAX_VALUE} inclusive;
|
jaroslav@68
|
4482 |
* {@code false} otherwise.
|
jaroslav@68
|
4483 |
* @since 1.7
|
jaroslav@68
|
4484 |
*/
|
jaroslav@68
|
4485 |
public static boolean isBmpCodePoint(int codePoint) {
|
jaroslav@68
|
4486 |
return codePoint >>> 16 == 0;
|
jaroslav@68
|
4487 |
// Optimized form of:
|
jaroslav@68
|
4488 |
// codePoint >= MIN_VALUE && codePoint <= MAX_VALUE
|
jaroslav@68
|
4489 |
// We consistently use logical shift (>>>) to facilitate
|
jaroslav@68
|
4490 |
// additional runtime optimizations.
|
jaroslav@68
|
4491 |
}
|
jaroslav@68
|
4492 |
|
jaroslav@68
|
4493 |
/**
|
jaroslav@68
|
4494 |
* Determines whether the specified character (Unicode code point)
|
jaroslav@68
|
4495 |
* is in the <a href="#supplementary">supplementary character</a> range.
|
jaroslav@68
|
4496 |
*
|
jaroslav@68
|
4497 |
* @param codePoint the character (Unicode code point) to be tested
|
jaroslav@68
|
4498 |
* @return {@code true} if the specified code point is between
|
jaroslav@68
|
4499 |
* {@link #MIN_SUPPLEMENTARY_CODE_POINT} and
|
jaroslav@68
|
4500 |
* {@link #MAX_CODE_POINT} inclusive;
|
jaroslav@68
|
4501 |
* {@code false} otherwise.
|
jaroslav@68
|
4502 |
* @since 1.5
|
jaroslav@68
|
4503 |
*/
|
jaroslav@68
|
4504 |
public static boolean isSupplementaryCodePoint(int codePoint) {
|
jaroslav@68
|
4505 |
return codePoint >= MIN_SUPPLEMENTARY_CODE_POINT
|
jaroslav@68
|
4506 |
&& codePoint < MAX_CODE_POINT + 1;
|
jaroslav@68
|
4507 |
}
|
jaroslav@68
|
4508 |
|
jaroslav@68
|
4509 |
/**
|
jaroslav@68
|
4510 |
* Determines if the given {@code char} value is a
|
jaroslav@68
|
4511 |
* <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit">
|
jaroslav@68
|
4512 |
* Unicode high-surrogate code unit</a>
|
jaroslav@68
|
4513 |
* (also known as <i>leading-surrogate code unit</i>).
|
jaroslav@68
|
4514 |
*
|
jaroslav@68
|
4515 |
* <p>Such values do not represent characters by themselves,
|
jaroslav@68
|
4516 |
* but are used in the representation of
|
jaroslav@68
|
4517 |
* <a href="#supplementary">supplementary characters</a>
|
jaroslav@68
|
4518 |
* in the UTF-16 encoding.
|
jaroslav@68
|
4519 |
*
|
jaroslav@68
|
4520 |
* @param ch the {@code char} value to be tested.
|
jaroslav@68
|
4521 |
* @return {@code true} if the {@code char} value is between
|
jaroslav@68
|
4522 |
* {@link #MIN_HIGH_SURROGATE} and
|
jaroslav@68
|
4523 |
* {@link #MAX_HIGH_SURROGATE} inclusive;
|
jaroslav@68
|
4524 |
* {@code false} otherwise.
|
jaroslav@68
|
4525 |
* @see Character#isLowSurrogate(char)
|
jaroslav@68
|
4526 |
* @see Character.UnicodeBlock#of(int)
|
jaroslav@68
|
4527 |
* @since 1.5
|
jaroslav@68
|
4528 |
*/
|
jaroslav@68
|
4529 |
public static boolean isHighSurrogate(char ch) {
|
jaroslav@68
|
4530 |
// Help VM constant-fold; MAX_HIGH_SURROGATE + 1 == MIN_LOW_SURROGATE
|
jaroslav@68
|
4531 |
return ch >= MIN_HIGH_SURROGATE && ch < (MAX_HIGH_SURROGATE + 1);
|
jaroslav@68
|
4532 |
}
|
jaroslav@68
|
4533 |
|
jaroslav@68
|
4534 |
/**
|
jaroslav@68
|
4535 |
* Determines if the given {@code char} value is a
|
jaroslav@68
|
4536 |
* <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit">
|
jaroslav@68
|
4537 |
* Unicode low-surrogate code unit</a>
|
jaroslav@68
|
4538 |
* (also known as <i>trailing-surrogate code unit</i>).
|
jaroslav@68
|
4539 |
*
|
jaroslav@68
|
4540 |
* <p>Such values do not represent characters by themselves,
|
jaroslav@68
|
4541 |
* but are used in the representation of
|
jaroslav@68
|
4542 |
* <a href="#supplementary">supplementary characters</a>
|
jaroslav@68
|
4543 |
* in the UTF-16 encoding.
|
jaroslav@68
|
4544 |
*
|
jaroslav@68
|
4545 |
* @param ch the {@code char} value to be tested.
|
jaroslav@68
|
4546 |
* @return {@code true} if the {@code char} value is between
|
jaroslav@68
|
4547 |
* {@link #MIN_LOW_SURROGATE} and
|
jaroslav@68
|
4548 |
* {@link #MAX_LOW_SURROGATE} inclusive;
|
jaroslav@68
|
4549 |
* {@code false} otherwise.
|
jaroslav@68
|
4550 |
* @see Character#isHighSurrogate(char)
|
jaroslav@68
|
4551 |
* @since 1.5
|
jaroslav@68
|
4552 |
*/
|
jaroslav@68
|
4553 |
public static boolean isLowSurrogate(char ch) {
|
jaroslav@68
|
4554 |
return ch >= MIN_LOW_SURROGATE && ch < (MAX_LOW_SURROGATE + 1);
|
jaroslav@68
|
4555 |
}
|
jaroslav@68
|
4556 |
|
jaroslav@68
|
4557 |
/**
|
jaroslav@68
|
4558 |
* Determines if the given {@code char} value is a Unicode
|
jaroslav@68
|
4559 |
* <i>surrogate code unit</i>.
|
jaroslav@68
|
4560 |
*
|
jaroslav@68
|
4561 |
* <p>Such values do not represent characters by themselves,
|
jaroslav@68
|
4562 |
* but are used in the representation of
|
jaroslav@68
|
4563 |
* <a href="#supplementary">supplementary characters</a>
|
jaroslav@68
|
4564 |
* in the UTF-16 encoding.
|
jaroslav@68
|
4565 |
*
|
jaroslav@68
|
4566 |
* <p>A char value is a surrogate code unit if and only if it is either
|
jaroslav@68
|
4567 |
* a {@linkplain #isLowSurrogate(char) low-surrogate code unit} or
|
jaroslav@68
|
4568 |
* a {@linkplain #isHighSurrogate(char) high-surrogate code unit}.
|
jaroslav@68
|
4569 |
*
|
jaroslav@68
|
4570 |
* @param ch the {@code char} value to be tested.
|
jaroslav@68
|
4571 |
* @return {@code true} if the {@code char} value is between
|
jaroslav@68
|
4572 |
* {@link #MIN_SURROGATE} and
|
jaroslav@68
|
4573 |
* {@link #MAX_SURROGATE} inclusive;
|
jaroslav@68
|
4574 |
* {@code false} otherwise.
|
jaroslav@68
|
4575 |
* @since 1.7
|
jaroslav@68
|
4576 |
*/
|
jaroslav@68
|
4577 |
public static boolean isSurrogate(char ch) {
|
jaroslav@68
|
4578 |
return ch >= MIN_SURROGATE && ch < (MAX_SURROGATE + 1);
|
jaroslav@68
|
4579 |
}
|
jaroslav@68
|
4580 |
|
jaroslav@68
|
4581 |
/**
|
jaroslav@68
|
4582 |
* Determines whether the specified pair of {@code char}
|
jaroslav@68
|
4583 |
* values is a valid
|
jaroslav@68
|
4584 |
* <a href="http://www.unicode.org/glossary/#surrogate_pair">
|
jaroslav@68
|
4585 |
* Unicode surrogate pair</a>.
|
jaroslav@68
|
4586 |
|
jaroslav@68
|
4587 |
* <p>This method is equivalent to the expression:
|
jaroslav@68
|
4588 |
* <blockquote><pre>
|
jaroslav@68
|
4589 |
* isHighSurrogate(high) && isLowSurrogate(low)
|
jaroslav@68
|
4590 |
* </pre></blockquote>
|
jaroslav@68
|
4591 |
*
|
jaroslav@68
|
4592 |
* @param high the high-surrogate code value to be tested
|
jaroslav@68
|
4593 |
* @param low the low-surrogate code value to be tested
|
jaroslav@68
|
4594 |
* @return {@code true} if the specified high and
|
jaroslav@68
|
4595 |
* low-surrogate code values represent a valid surrogate pair;
|
jaroslav@68
|
4596 |
* {@code false} otherwise.
|
jaroslav@68
|
4597 |
* @since 1.5
|
jaroslav@68
|
4598 |
*/
|
jaroslav@68
|
4599 |
public static boolean isSurrogatePair(char high, char low) {
|
jaroslav@68
|
4600 |
return isHighSurrogate(high) && isLowSurrogate(low);
|
jaroslav@68
|
4601 |
}
|
jaroslav@68
|
4602 |
|
jaroslav@68
|
4603 |
/**
|
jaroslav@68
|
4604 |
* Determines the number of {@code char} values needed to
|
jaroslav@68
|
4605 |
* represent the specified character (Unicode code point). If the
|
jaroslav@68
|
4606 |
* specified character is equal to or greater than 0x10000, then
|
jaroslav@68
|
4607 |
* the method returns 2. Otherwise, the method returns 1.
|
jaroslav@68
|
4608 |
*
|
jaroslav@68
|
4609 |
* <p>This method doesn't validate the specified character to be a
|
jaroslav@68
|
4610 |
* valid Unicode code point. The caller must validate the
|
jaroslav@68
|
4611 |
* character value using {@link #isValidCodePoint(int) isValidCodePoint}
|
jaroslav@68
|
4612 |
* if necessary.
|
jaroslav@68
|
4613 |
*
|
jaroslav@68
|
4614 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
4615 |
* @return 2 if the character is a valid supplementary character; 1 otherwise.
|
jaroslav@68
|
4616 |
* @see Character#isSupplementaryCodePoint(int)
|
jaroslav@68
|
4617 |
* @since 1.5
|
jaroslav@68
|
4618 |
*/
|
jaroslav@68
|
4619 |
public static int charCount(int codePoint) {
|
jaroslav@68
|
4620 |
return codePoint >= MIN_SUPPLEMENTARY_CODE_POINT ? 2 : 1;
|
jaroslav@68
|
4621 |
}
|
jaroslav@68
|
4622 |
|
jaroslav@68
|
4623 |
/**
|
jaroslav@68
|
4624 |
* Converts the specified surrogate pair to its supplementary code
|
jaroslav@68
|
4625 |
* point value. This method does not validate the specified
|
jaroslav@68
|
4626 |
* surrogate pair. The caller must validate it using {@link
|
jaroslav@68
|
4627 |
* #isSurrogatePair(char, char) isSurrogatePair} if necessary.
|
jaroslav@68
|
4628 |
*
|
jaroslav@68
|
4629 |
* @param high the high-surrogate code unit
|
jaroslav@68
|
4630 |
* @param low the low-surrogate code unit
|
jaroslav@68
|
4631 |
* @return the supplementary code point composed from the
|
jaroslav@68
|
4632 |
* specified surrogate pair.
|
jaroslav@68
|
4633 |
* @since 1.5
|
jaroslav@68
|
4634 |
*/
|
jaroslav@68
|
4635 |
public static int toCodePoint(char high, char low) {
|
jaroslav@68
|
4636 |
// Optimized form of:
|
jaroslav@68
|
4637 |
// return ((high - MIN_HIGH_SURROGATE) << 10)
|
jaroslav@68
|
4638 |
// + (low - MIN_LOW_SURROGATE)
|
jaroslav@68
|
4639 |
// + MIN_SUPPLEMENTARY_CODE_POINT;
|
jaroslav@68
|
4640 |
return ((high << 10) + low) + (MIN_SUPPLEMENTARY_CODE_POINT
|
jaroslav@68
|
4641 |
- (MIN_HIGH_SURROGATE << 10)
|
jaroslav@68
|
4642 |
- MIN_LOW_SURROGATE);
|
jaroslav@68
|
4643 |
}
|
jaroslav@68
|
4644 |
|
jaroslav@68
|
4645 |
/**
|
jaroslav@68
|
4646 |
* Returns the code point at the given index of the
|
jaroslav@68
|
4647 |
* {@code CharSequence}. If the {@code char} value at
|
jaroslav@68
|
4648 |
* the given index in the {@code CharSequence} is in the
|
jaroslav@68
|
4649 |
* high-surrogate range, the following index is less than the
|
jaroslav@68
|
4650 |
* length of the {@code CharSequence}, and the
|
jaroslav@68
|
4651 |
* {@code char} value at the following index is in the
|
jaroslav@68
|
4652 |
* low-surrogate range, then the supplementary code point
|
jaroslav@68
|
4653 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4654 |
* the {@code char} value at the given index is returned.
|
jaroslav@68
|
4655 |
*
|
jaroslav@68
|
4656 |
* @param seq a sequence of {@code char} values (Unicode code
|
jaroslav@68
|
4657 |
* units)
|
jaroslav@68
|
4658 |
* @param index the index to the {@code char} values (Unicode
|
jaroslav@68
|
4659 |
* code units) in {@code seq} to be converted
|
jaroslav@68
|
4660 |
* @return the Unicode code point at the given index
|
jaroslav@68
|
4661 |
* @exception NullPointerException if {@code seq} is null.
|
jaroslav@68
|
4662 |
* @exception IndexOutOfBoundsException if the value
|
jaroslav@68
|
4663 |
* {@code index} is negative or not less than
|
jaroslav@68
|
4664 |
* {@link CharSequence#length() seq.length()}.
|
jaroslav@68
|
4665 |
* @since 1.5
|
jaroslav@68
|
4666 |
*/
|
jaroslav@68
|
4667 |
public static int codePointAt(CharSequence seq, int index) {
|
jaroslav@68
|
4668 |
char c1 = seq.charAt(index++);
|
jaroslav@68
|
4669 |
if (isHighSurrogate(c1)) {
|
jaroslav@68
|
4670 |
if (index < seq.length()) {
|
jaroslav@68
|
4671 |
char c2 = seq.charAt(index);
|
jaroslav@68
|
4672 |
if (isLowSurrogate(c2)) {
|
jaroslav@68
|
4673 |
return toCodePoint(c1, c2);
|
jaroslav@68
|
4674 |
}
|
jaroslav@68
|
4675 |
}
|
jaroslav@68
|
4676 |
}
|
jaroslav@68
|
4677 |
return c1;
|
jaroslav@68
|
4678 |
}
|
jaroslav@68
|
4679 |
|
jaroslav@68
|
4680 |
/**
|
jaroslav@68
|
4681 |
* Returns the code point at the given index of the
|
jaroslav@68
|
4682 |
* {@code char} array. If the {@code char} value at
|
jaroslav@68
|
4683 |
* the given index in the {@code char} array is in the
|
jaroslav@68
|
4684 |
* high-surrogate range, the following index is less than the
|
jaroslav@68
|
4685 |
* length of the {@code char} array, and the
|
jaroslav@68
|
4686 |
* {@code char} value at the following index is in the
|
jaroslav@68
|
4687 |
* low-surrogate range, then the supplementary code point
|
jaroslav@68
|
4688 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4689 |
* the {@code char} value at the given index is returned.
|
jaroslav@68
|
4690 |
*
|
jaroslav@68
|
4691 |
* @param a the {@code char} array
|
jaroslav@68
|
4692 |
* @param index the index to the {@code char} values (Unicode
|
jaroslav@68
|
4693 |
* code units) in the {@code char} array to be converted
|
jaroslav@68
|
4694 |
* @return the Unicode code point at the given index
|
jaroslav@68
|
4695 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
4696 |
* @exception IndexOutOfBoundsException if the value
|
jaroslav@68
|
4697 |
* {@code index} is negative or not less than
|
jaroslav@68
|
4698 |
* the length of the {@code char} array.
|
jaroslav@68
|
4699 |
* @since 1.5
|
jaroslav@68
|
4700 |
*/
|
jaroslav@68
|
4701 |
public static int codePointAt(char[] a, int index) {
|
jaroslav@68
|
4702 |
return codePointAtImpl(a, index, a.length);
|
jaroslav@68
|
4703 |
}
|
jaroslav@68
|
4704 |
|
jaroslav@68
|
4705 |
/**
|
jaroslav@68
|
4706 |
* Returns the code point at the given index of the
|
jaroslav@68
|
4707 |
* {@code char} array, where only array elements with
|
jaroslav@68
|
4708 |
* {@code index} less than {@code limit} can be used. If
|
jaroslav@68
|
4709 |
* the {@code char} value at the given index in the
|
jaroslav@68
|
4710 |
* {@code char} array is in the high-surrogate range, the
|
jaroslav@68
|
4711 |
* following index is less than the {@code limit}, and the
|
jaroslav@68
|
4712 |
* {@code char} value at the following index is in the
|
jaroslav@68
|
4713 |
* low-surrogate range, then the supplementary code point
|
jaroslav@68
|
4714 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4715 |
* the {@code char} value at the given index is returned.
|
jaroslav@68
|
4716 |
*
|
jaroslav@68
|
4717 |
* @param a the {@code char} array
|
jaroslav@68
|
4718 |
* @param index the index to the {@code char} values (Unicode
|
jaroslav@68
|
4719 |
* code units) in the {@code char} array to be converted
|
jaroslav@68
|
4720 |
* @param limit the index after the last array element that
|
jaroslav@68
|
4721 |
* can be used in the {@code char} array
|
jaroslav@68
|
4722 |
* @return the Unicode code point at the given index
|
jaroslav@68
|
4723 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
4724 |
* @exception IndexOutOfBoundsException if the {@code index}
|
jaroslav@68
|
4725 |
* argument is negative or not less than the {@code limit}
|
jaroslav@68
|
4726 |
* argument, or if the {@code limit} argument is negative or
|
jaroslav@68
|
4727 |
* greater than the length of the {@code char} array.
|
jaroslav@68
|
4728 |
* @since 1.5
|
jaroslav@68
|
4729 |
*/
|
jaroslav@68
|
4730 |
public static int codePointAt(char[] a, int index, int limit) {
|
jaroslav@68
|
4731 |
if (index >= limit || limit < 0 || limit > a.length) {
|
jaroslav@68
|
4732 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
4733 |
}
|
jaroslav@68
|
4734 |
return codePointAtImpl(a, index, limit);
|
jaroslav@68
|
4735 |
}
|
jaroslav@68
|
4736 |
|
jaroslav@68
|
4737 |
// throws ArrayIndexOutofBoundsException if index out of bounds
|
jaroslav@68
|
4738 |
static int codePointAtImpl(char[] a, int index, int limit) {
|
jaroslav@68
|
4739 |
char c1 = a[index++];
|
jaroslav@68
|
4740 |
if (isHighSurrogate(c1)) {
|
jaroslav@68
|
4741 |
if (index < limit) {
|
jaroslav@68
|
4742 |
char c2 = a[index];
|
jaroslav@68
|
4743 |
if (isLowSurrogate(c2)) {
|
jaroslav@68
|
4744 |
return toCodePoint(c1, c2);
|
jaroslav@68
|
4745 |
}
|
jaroslav@68
|
4746 |
}
|
jaroslav@68
|
4747 |
}
|
jaroslav@68
|
4748 |
return c1;
|
jaroslav@68
|
4749 |
}
|
jaroslav@68
|
4750 |
|
jaroslav@68
|
4751 |
/**
|
jaroslav@68
|
4752 |
* Returns the code point preceding the given index of the
|
jaroslav@68
|
4753 |
* {@code CharSequence}. If the {@code char} value at
|
jaroslav@68
|
4754 |
* {@code (index - 1)} in the {@code CharSequence} is in
|
jaroslav@68
|
4755 |
* the low-surrogate range, {@code (index - 2)} is not
|
jaroslav@68
|
4756 |
* negative, and the {@code char} value at {@code (index - 2)}
|
jaroslav@68
|
4757 |
* in the {@code CharSequence} is in the
|
jaroslav@68
|
4758 |
* high-surrogate range, then the supplementary code point
|
jaroslav@68
|
4759 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4760 |
* the {@code char} value at {@code (index - 1)} is
|
jaroslav@68
|
4761 |
* returned.
|
jaroslav@68
|
4762 |
*
|
jaroslav@68
|
4763 |
* @param seq the {@code CharSequence} instance
|
jaroslav@68
|
4764 |
* @param index the index following the code point that should be returned
|
jaroslav@68
|
4765 |
* @return the Unicode code point value before the given index.
|
jaroslav@68
|
4766 |
* @exception NullPointerException if {@code seq} is null.
|
jaroslav@68
|
4767 |
* @exception IndexOutOfBoundsException if the {@code index}
|
jaroslav@68
|
4768 |
* argument is less than 1 or greater than {@link
|
jaroslav@68
|
4769 |
* CharSequence#length() seq.length()}.
|
jaroslav@68
|
4770 |
* @since 1.5
|
jaroslav@68
|
4771 |
*/
|
jaroslav@68
|
4772 |
public static int codePointBefore(CharSequence seq, int index) {
|
jaroslav@68
|
4773 |
char c2 = seq.charAt(--index);
|
jaroslav@68
|
4774 |
if (isLowSurrogate(c2)) {
|
jaroslav@68
|
4775 |
if (index > 0) {
|
jaroslav@68
|
4776 |
char c1 = seq.charAt(--index);
|
jaroslav@68
|
4777 |
if (isHighSurrogate(c1)) {
|
jaroslav@68
|
4778 |
return toCodePoint(c1, c2);
|
jaroslav@68
|
4779 |
}
|
jaroslav@68
|
4780 |
}
|
jaroslav@68
|
4781 |
}
|
jaroslav@68
|
4782 |
return c2;
|
jaroslav@68
|
4783 |
}
|
jaroslav@68
|
4784 |
|
jaroslav@68
|
4785 |
/**
|
jaroslav@68
|
4786 |
* Returns the code point preceding the given index of the
|
jaroslav@68
|
4787 |
* {@code char} array. If the {@code char} value at
|
jaroslav@68
|
4788 |
* {@code (index - 1)} in the {@code char} array is in
|
jaroslav@68
|
4789 |
* the low-surrogate range, {@code (index - 2)} is not
|
jaroslav@68
|
4790 |
* negative, and the {@code char} value at {@code (index - 2)}
|
jaroslav@68
|
4791 |
* in the {@code char} array is in the
|
jaroslav@68
|
4792 |
* high-surrogate range, then the supplementary code point
|
jaroslav@68
|
4793 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4794 |
* the {@code char} value at {@code (index - 1)} is
|
jaroslav@68
|
4795 |
* returned.
|
jaroslav@68
|
4796 |
*
|
jaroslav@68
|
4797 |
* @param a the {@code char} array
|
jaroslav@68
|
4798 |
* @param index the index following the code point that should be returned
|
jaroslav@68
|
4799 |
* @return the Unicode code point value before the given index.
|
jaroslav@68
|
4800 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
4801 |
* @exception IndexOutOfBoundsException if the {@code index}
|
jaroslav@68
|
4802 |
* argument is less than 1 or greater than the length of the
|
jaroslav@68
|
4803 |
* {@code char} array
|
jaroslav@68
|
4804 |
* @since 1.5
|
jaroslav@68
|
4805 |
*/
|
jaroslav@68
|
4806 |
public static int codePointBefore(char[] a, int index) {
|
jaroslav@68
|
4807 |
return codePointBeforeImpl(a, index, 0);
|
jaroslav@68
|
4808 |
}
|
jaroslav@68
|
4809 |
|
jaroslav@68
|
4810 |
/**
|
jaroslav@68
|
4811 |
* Returns the code point preceding the given index of the
|
jaroslav@68
|
4812 |
* {@code char} array, where only array elements with
|
jaroslav@68
|
4813 |
* {@code index} greater than or equal to {@code start}
|
jaroslav@68
|
4814 |
* can be used. If the {@code char} value at {@code (index - 1)}
|
jaroslav@68
|
4815 |
* in the {@code char} array is in the
|
jaroslav@68
|
4816 |
* low-surrogate range, {@code (index - 2)} is not less than
|
jaroslav@68
|
4817 |
* {@code start}, and the {@code char} value at
|
jaroslav@68
|
4818 |
* {@code (index - 2)} in the {@code char} array is in
|
jaroslav@68
|
4819 |
* the high-surrogate range, then the supplementary code point
|
jaroslav@68
|
4820 |
* corresponding to this surrogate pair is returned. Otherwise,
|
jaroslav@68
|
4821 |
* the {@code char} value at {@code (index - 1)} is
|
jaroslav@68
|
4822 |
* returned.
|
jaroslav@68
|
4823 |
*
|
jaroslav@68
|
4824 |
* @param a the {@code char} array
|
jaroslav@68
|
4825 |
* @param index the index following the code point that should be returned
|
jaroslav@68
|
4826 |
* @param start the index of the first array element in the
|
jaroslav@68
|
4827 |
* {@code char} array
|
jaroslav@68
|
4828 |
* @return the Unicode code point value before the given index.
|
jaroslav@68
|
4829 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
4830 |
* @exception IndexOutOfBoundsException if the {@code index}
|
jaroslav@68
|
4831 |
* argument is not greater than the {@code start} argument or
|
jaroslav@68
|
4832 |
* is greater than the length of the {@code char} array, or
|
jaroslav@68
|
4833 |
* if the {@code start} argument is negative or not less than
|
jaroslav@68
|
4834 |
* the length of the {@code char} array.
|
jaroslav@68
|
4835 |
* @since 1.5
|
jaroslav@68
|
4836 |
*/
|
jaroslav@68
|
4837 |
public static int codePointBefore(char[] a, int index, int start) {
|
jaroslav@68
|
4838 |
if (index <= start || start < 0 || start >= a.length) {
|
jaroslav@68
|
4839 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
4840 |
}
|
jaroslav@68
|
4841 |
return codePointBeforeImpl(a, index, start);
|
jaroslav@68
|
4842 |
}
|
jaroslav@68
|
4843 |
|
jaroslav@68
|
4844 |
// throws ArrayIndexOutofBoundsException if index-1 out of bounds
|
jaroslav@68
|
4845 |
static int codePointBeforeImpl(char[] a, int index, int start) {
|
jaroslav@68
|
4846 |
char c2 = a[--index];
|
jaroslav@68
|
4847 |
if (isLowSurrogate(c2)) {
|
jaroslav@68
|
4848 |
if (index > start) {
|
jaroslav@68
|
4849 |
char c1 = a[--index];
|
jaroslav@68
|
4850 |
if (isHighSurrogate(c1)) {
|
jaroslav@68
|
4851 |
return toCodePoint(c1, c2);
|
jaroslav@68
|
4852 |
}
|
jaroslav@68
|
4853 |
}
|
jaroslav@68
|
4854 |
}
|
jaroslav@68
|
4855 |
return c2;
|
jaroslav@68
|
4856 |
}
|
jaroslav@68
|
4857 |
|
jaroslav@68
|
4858 |
/**
|
jaroslav@68
|
4859 |
* Returns the leading surrogate (a
|
jaroslav@68
|
4860 |
* <a href="http://www.unicode.org/glossary/#high_surrogate_code_unit">
|
jaroslav@68
|
4861 |
* high surrogate code unit</a>) of the
|
jaroslav@68
|
4862 |
* <a href="http://www.unicode.org/glossary/#surrogate_pair">
|
jaroslav@68
|
4863 |
* surrogate pair</a>
|
jaroslav@68
|
4864 |
* representing the specified supplementary character (Unicode
|
jaroslav@68
|
4865 |
* code point) in the UTF-16 encoding. If the specified character
|
jaroslav@68
|
4866 |
* is not a
|
jaroslav@68
|
4867 |
* <a href="Character.html#supplementary">supplementary character</a>,
|
jaroslav@68
|
4868 |
* an unspecified {@code char} is returned.
|
jaroslav@68
|
4869 |
*
|
jaroslav@68
|
4870 |
* <p>If
|
jaroslav@68
|
4871 |
* {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)}
|
jaroslav@68
|
4872 |
* is {@code true}, then
|
jaroslav@68
|
4873 |
* {@link #isHighSurrogate isHighSurrogate}{@code (highSurrogate(x))} and
|
jaroslav@68
|
4874 |
* {@link #toCodePoint toCodePoint}{@code (highSurrogate(x), }{@link #lowSurrogate lowSurrogate}{@code (x)) == x}
|
jaroslav@68
|
4875 |
* are also always {@code true}.
|
jaroslav@68
|
4876 |
*
|
jaroslav@68
|
4877 |
* @param codePoint a supplementary character (Unicode code point)
|
jaroslav@68
|
4878 |
* @return the leading surrogate code unit used to represent the
|
jaroslav@68
|
4879 |
* character in the UTF-16 encoding
|
jaroslav@68
|
4880 |
* @since 1.7
|
jaroslav@68
|
4881 |
*/
|
jaroslav@68
|
4882 |
public static char highSurrogate(int codePoint) {
|
jaroslav@68
|
4883 |
return (char) ((codePoint >>> 10)
|
jaroslav@68
|
4884 |
+ (MIN_HIGH_SURROGATE - (MIN_SUPPLEMENTARY_CODE_POINT >>> 10)));
|
jaroslav@68
|
4885 |
}
|
jaroslav@68
|
4886 |
|
jaroslav@68
|
4887 |
/**
|
jaroslav@68
|
4888 |
* Returns the trailing surrogate (a
|
jaroslav@68
|
4889 |
* <a href="http://www.unicode.org/glossary/#low_surrogate_code_unit">
|
jaroslav@68
|
4890 |
* low surrogate code unit</a>) of the
|
jaroslav@68
|
4891 |
* <a href="http://www.unicode.org/glossary/#surrogate_pair">
|
jaroslav@68
|
4892 |
* surrogate pair</a>
|
jaroslav@68
|
4893 |
* representing the specified supplementary character (Unicode
|
jaroslav@68
|
4894 |
* code point) in the UTF-16 encoding. If the specified character
|
jaroslav@68
|
4895 |
* is not a
|
jaroslav@68
|
4896 |
* <a href="Character.html#supplementary">supplementary character</a>,
|
jaroslav@68
|
4897 |
* an unspecified {@code char} is returned.
|
jaroslav@68
|
4898 |
*
|
jaroslav@68
|
4899 |
* <p>If
|
jaroslav@68
|
4900 |
* {@link #isSupplementaryCodePoint isSupplementaryCodePoint(x)}
|
jaroslav@68
|
4901 |
* is {@code true}, then
|
jaroslav@68
|
4902 |
* {@link #isLowSurrogate isLowSurrogate}{@code (lowSurrogate(x))} and
|
jaroslav@68
|
4903 |
* {@link #toCodePoint toCodePoint}{@code (}{@link #highSurrogate highSurrogate}{@code (x), lowSurrogate(x)) == x}
|
jaroslav@68
|
4904 |
* are also always {@code true}.
|
jaroslav@68
|
4905 |
*
|
jaroslav@68
|
4906 |
* @param codePoint a supplementary character (Unicode code point)
|
jaroslav@68
|
4907 |
* @return the trailing surrogate code unit used to represent the
|
jaroslav@68
|
4908 |
* character in the UTF-16 encoding
|
jaroslav@68
|
4909 |
* @since 1.7
|
jaroslav@68
|
4910 |
*/
|
jaroslav@68
|
4911 |
public static char lowSurrogate(int codePoint) {
|
jaroslav@68
|
4912 |
return (char) ((codePoint & 0x3ff) + MIN_LOW_SURROGATE);
|
jaroslav@68
|
4913 |
}
|
jaroslav@68
|
4914 |
|
jaroslav@68
|
4915 |
/**
|
jaroslav@68
|
4916 |
* Converts the specified character (Unicode code point) to its
|
jaroslav@68
|
4917 |
* UTF-16 representation. If the specified code point is a BMP
|
jaroslav@68
|
4918 |
* (Basic Multilingual Plane or Plane 0) value, the same value is
|
jaroslav@68
|
4919 |
* stored in {@code dst[dstIndex]}, and 1 is returned. If the
|
jaroslav@68
|
4920 |
* specified code point is a supplementary character, its
|
jaroslav@68
|
4921 |
* surrogate values are stored in {@code dst[dstIndex]}
|
jaroslav@68
|
4922 |
* (high-surrogate) and {@code dst[dstIndex+1]}
|
jaroslav@68
|
4923 |
* (low-surrogate), and 2 is returned.
|
jaroslav@68
|
4924 |
*
|
jaroslav@68
|
4925 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
4926 |
* @param dst an array of {@code char} in which the
|
jaroslav@68
|
4927 |
* {@code codePoint}'s UTF-16 value is stored.
|
jaroslav@68
|
4928 |
* @param dstIndex the start index into the {@code dst}
|
jaroslav@68
|
4929 |
* array where the converted value is stored.
|
jaroslav@68
|
4930 |
* @return 1 if the code point is a BMP code point, 2 if the
|
jaroslav@68
|
4931 |
* code point is a supplementary code point.
|
jaroslav@68
|
4932 |
* @exception IllegalArgumentException if the specified
|
jaroslav@68
|
4933 |
* {@code codePoint} is not a valid Unicode code point.
|
jaroslav@68
|
4934 |
* @exception NullPointerException if the specified {@code dst} is null.
|
jaroslav@68
|
4935 |
* @exception IndexOutOfBoundsException if {@code dstIndex}
|
jaroslav@68
|
4936 |
* is negative or not less than {@code dst.length}, or if
|
jaroslav@68
|
4937 |
* {@code dst} at {@code dstIndex} doesn't have enough
|
jaroslav@68
|
4938 |
* array element(s) to store the resulting {@code char}
|
jaroslav@68
|
4939 |
* value(s). (If {@code dstIndex} is equal to
|
jaroslav@68
|
4940 |
* {@code dst.length-1} and the specified
|
jaroslav@68
|
4941 |
* {@code codePoint} is a supplementary character, the
|
jaroslav@68
|
4942 |
* high-surrogate value is not stored in
|
jaroslav@68
|
4943 |
* {@code dst[dstIndex]}.)
|
jaroslav@68
|
4944 |
* @since 1.5
|
jaroslav@68
|
4945 |
*/
|
jaroslav@68
|
4946 |
public static int toChars(int codePoint, char[] dst, int dstIndex) {
|
jaroslav@68
|
4947 |
if (isBmpCodePoint(codePoint)) {
|
jaroslav@68
|
4948 |
dst[dstIndex] = (char) codePoint;
|
jaroslav@68
|
4949 |
return 1;
|
jaroslav@68
|
4950 |
} else if (isValidCodePoint(codePoint)) {
|
jaroslav@68
|
4951 |
toSurrogates(codePoint, dst, dstIndex);
|
jaroslav@68
|
4952 |
return 2;
|
jaroslav@68
|
4953 |
} else {
|
jaroslav@68
|
4954 |
throw new IllegalArgumentException();
|
jaroslav@68
|
4955 |
}
|
jaroslav@68
|
4956 |
}
|
jaroslav@68
|
4957 |
|
jaroslav@68
|
4958 |
/**
|
jaroslav@68
|
4959 |
* Converts the specified character (Unicode code point) to its
|
jaroslav@68
|
4960 |
* UTF-16 representation stored in a {@code char} array. If
|
jaroslav@68
|
4961 |
* the specified code point is a BMP (Basic Multilingual Plane or
|
jaroslav@68
|
4962 |
* Plane 0) value, the resulting {@code char} array has
|
jaroslav@68
|
4963 |
* the same value as {@code codePoint}. If the specified code
|
jaroslav@68
|
4964 |
* point is a supplementary code point, the resulting
|
jaroslav@68
|
4965 |
* {@code char} array has the corresponding surrogate pair.
|
jaroslav@68
|
4966 |
*
|
jaroslav@68
|
4967 |
* @param codePoint a Unicode code point
|
jaroslav@68
|
4968 |
* @return a {@code char} array having
|
jaroslav@68
|
4969 |
* {@code codePoint}'s UTF-16 representation.
|
jaroslav@68
|
4970 |
* @exception IllegalArgumentException if the specified
|
jaroslav@68
|
4971 |
* {@code codePoint} is not a valid Unicode code point.
|
jaroslav@68
|
4972 |
* @since 1.5
|
jaroslav@68
|
4973 |
*/
|
jaroslav@68
|
4974 |
public static char[] toChars(int codePoint) {
|
jaroslav@68
|
4975 |
if (isBmpCodePoint(codePoint)) {
|
jaroslav@68
|
4976 |
return new char[] { (char) codePoint };
|
jaroslav@68
|
4977 |
} else if (isValidCodePoint(codePoint)) {
|
jaroslav@68
|
4978 |
char[] result = new char[2];
|
jaroslav@68
|
4979 |
toSurrogates(codePoint, result, 0);
|
jaroslav@68
|
4980 |
return result;
|
jaroslav@68
|
4981 |
} else {
|
jaroslav@68
|
4982 |
throw new IllegalArgumentException();
|
jaroslav@68
|
4983 |
}
|
jaroslav@68
|
4984 |
}
|
jaroslav@68
|
4985 |
|
jaroslav@68
|
4986 |
static void toSurrogates(int codePoint, char[] dst, int index) {
|
jaroslav@68
|
4987 |
// We write elements "backwards" to guarantee all-or-nothing
|
jaroslav@68
|
4988 |
dst[index+1] = lowSurrogate(codePoint);
|
jaroslav@68
|
4989 |
dst[index] = highSurrogate(codePoint);
|
jaroslav@68
|
4990 |
}
|
jaroslav@68
|
4991 |
|
jaroslav@68
|
4992 |
/**
|
jaroslav@68
|
4993 |
* Returns the number of Unicode code points in the text range of
|
jaroslav@68
|
4994 |
* the specified char sequence. The text range begins at the
|
jaroslav@68
|
4995 |
* specified {@code beginIndex} and extends to the
|
jaroslav@68
|
4996 |
* {@code char} at index {@code endIndex - 1}. Thus the
|
jaroslav@68
|
4997 |
* length (in {@code char}s) of the text range is
|
jaroslav@68
|
4998 |
* {@code endIndex-beginIndex}. Unpaired surrogates within
|
jaroslav@68
|
4999 |
* the text range count as one code point each.
|
jaroslav@68
|
5000 |
*
|
jaroslav@68
|
5001 |
* @param seq the char sequence
|
jaroslav@68
|
5002 |
* @param beginIndex the index to the first {@code char} of
|
jaroslav@68
|
5003 |
* the text range.
|
jaroslav@68
|
5004 |
* @param endIndex the index after the last {@code char} of
|
jaroslav@68
|
5005 |
* the text range.
|
jaroslav@68
|
5006 |
* @return the number of Unicode code points in the specified text
|
jaroslav@68
|
5007 |
* range
|
jaroslav@68
|
5008 |
* @exception NullPointerException if {@code seq} is null.
|
jaroslav@68
|
5009 |
* @exception IndexOutOfBoundsException if the
|
jaroslav@68
|
5010 |
* {@code beginIndex} is negative, or {@code endIndex}
|
jaroslav@68
|
5011 |
* is larger than the length of the given sequence, or
|
jaroslav@68
|
5012 |
* {@code beginIndex} is larger than {@code endIndex}.
|
jaroslav@68
|
5013 |
* @since 1.5
|
jaroslav@68
|
5014 |
*/
|
jaroslav@68
|
5015 |
public static int codePointCount(CharSequence seq, int beginIndex, int endIndex) {
|
jaroslav@68
|
5016 |
int length = seq.length();
|
jaroslav@68
|
5017 |
if (beginIndex < 0 || endIndex > length || beginIndex > endIndex) {
|
jaroslav@68
|
5018 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5019 |
}
|
jaroslav@68
|
5020 |
int n = endIndex - beginIndex;
|
jaroslav@68
|
5021 |
for (int i = beginIndex; i < endIndex; ) {
|
jaroslav@68
|
5022 |
if (isHighSurrogate(seq.charAt(i++)) && i < endIndex &&
|
jaroslav@68
|
5023 |
isLowSurrogate(seq.charAt(i))) {
|
jaroslav@68
|
5024 |
n--;
|
jaroslav@68
|
5025 |
i++;
|
jaroslav@68
|
5026 |
}
|
jaroslav@68
|
5027 |
}
|
jaroslav@68
|
5028 |
return n;
|
jaroslav@68
|
5029 |
}
|
jaroslav@68
|
5030 |
|
jaroslav@68
|
5031 |
/**
|
jaroslav@68
|
5032 |
* Returns the number of Unicode code points in a subarray of the
|
jaroslav@68
|
5033 |
* {@code char} array argument. The {@code offset}
|
jaroslav@68
|
5034 |
* argument is the index of the first {@code char} of the
|
jaroslav@68
|
5035 |
* subarray and the {@code count} argument specifies the
|
jaroslav@68
|
5036 |
* length of the subarray in {@code char}s. Unpaired
|
jaroslav@68
|
5037 |
* surrogates within the subarray count as one code point each.
|
jaroslav@68
|
5038 |
*
|
jaroslav@68
|
5039 |
* @param a the {@code char} array
|
jaroslav@68
|
5040 |
* @param offset the index of the first {@code char} in the
|
jaroslav@68
|
5041 |
* given {@code char} array
|
jaroslav@68
|
5042 |
* @param count the length of the subarray in {@code char}s
|
jaroslav@68
|
5043 |
* @return the number of Unicode code points in the specified subarray
|
jaroslav@68
|
5044 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
5045 |
* @exception IndexOutOfBoundsException if {@code offset} or
|
jaroslav@68
|
5046 |
* {@code count} is negative, or if {@code offset +
|
jaroslav@68
|
5047 |
* count} is larger than the length of the given array.
|
jaroslav@68
|
5048 |
* @since 1.5
|
jaroslav@68
|
5049 |
*/
|
jaroslav@68
|
5050 |
public static int codePointCount(char[] a, int offset, int count) {
|
jaroslav@68
|
5051 |
if (count > a.length - offset || offset < 0 || count < 0) {
|
jaroslav@68
|
5052 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5053 |
}
|
jaroslav@68
|
5054 |
return codePointCountImpl(a, offset, count);
|
jaroslav@68
|
5055 |
}
|
jaroslav@68
|
5056 |
|
jaroslav@68
|
5057 |
static int codePointCountImpl(char[] a, int offset, int count) {
|
jaroslav@68
|
5058 |
int endIndex = offset + count;
|
jaroslav@68
|
5059 |
int n = count;
|
jaroslav@68
|
5060 |
for (int i = offset; i < endIndex; ) {
|
jaroslav@68
|
5061 |
if (isHighSurrogate(a[i++]) && i < endIndex &&
|
jaroslav@68
|
5062 |
isLowSurrogate(a[i])) {
|
jaroslav@68
|
5063 |
n--;
|
jaroslav@68
|
5064 |
i++;
|
jaroslav@68
|
5065 |
}
|
jaroslav@68
|
5066 |
}
|
jaroslav@68
|
5067 |
return n;
|
jaroslav@68
|
5068 |
}
|
jaroslav@68
|
5069 |
|
jaroslav@68
|
5070 |
/**
|
jaroslav@68
|
5071 |
* Returns the index within the given char sequence that is offset
|
jaroslav@68
|
5072 |
* from the given {@code index} by {@code codePointOffset}
|
jaroslav@68
|
5073 |
* code points. Unpaired surrogates within the text range given by
|
jaroslav@68
|
5074 |
* {@code index} and {@code codePointOffset} count as
|
jaroslav@68
|
5075 |
* one code point each.
|
jaroslav@68
|
5076 |
*
|
jaroslav@68
|
5077 |
* @param seq the char sequence
|
jaroslav@68
|
5078 |
* @param index the index to be offset
|
jaroslav@68
|
5079 |
* @param codePointOffset the offset in code points
|
jaroslav@68
|
5080 |
* @return the index within the char sequence
|
jaroslav@68
|
5081 |
* @exception NullPointerException if {@code seq} is null.
|
jaroslav@68
|
5082 |
* @exception IndexOutOfBoundsException if {@code index}
|
jaroslav@68
|
5083 |
* is negative or larger then the length of the char sequence,
|
jaroslav@68
|
5084 |
* or if {@code codePointOffset} is positive and the
|
jaroslav@68
|
5085 |
* subsequence starting with {@code index} has fewer than
|
jaroslav@68
|
5086 |
* {@code codePointOffset} code points, or if
|
jaroslav@68
|
5087 |
* {@code codePointOffset} is negative and the subsequence
|
jaroslav@68
|
5088 |
* before {@code index} has fewer than the absolute value
|
jaroslav@68
|
5089 |
* of {@code codePointOffset} code points.
|
jaroslav@68
|
5090 |
* @since 1.5
|
jaroslav@68
|
5091 |
*/
|
jaroslav@68
|
5092 |
public static int offsetByCodePoints(CharSequence seq, int index,
|
jaroslav@68
|
5093 |
int codePointOffset) {
|
jaroslav@68
|
5094 |
int length = seq.length();
|
jaroslav@68
|
5095 |
if (index < 0 || index > length) {
|
jaroslav@68
|
5096 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5097 |
}
|
jaroslav@68
|
5098 |
|
jaroslav@68
|
5099 |
int x = index;
|
jaroslav@68
|
5100 |
if (codePointOffset >= 0) {
|
jaroslav@68
|
5101 |
int i;
|
jaroslav@68
|
5102 |
for (i = 0; x < length && i < codePointOffset; i++) {
|
jaroslav@68
|
5103 |
if (isHighSurrogate(seq.charAt(x++)) && x < length &&
|
jaroslav@68
|
5104 |
isLowSurrogate(seq.charAt(x))) {
|
jaroslav@68
|
5105 |
x++;
|
jaroslav@68
|
5106 |
}
|
jaroslav@68
|
5107 |
}
|
jaroslav@68
|
5108 |
if (i < codePointOffset) {
|
jaroslav@68
|
5109 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5110 |
}
|
jaroslav@68
|
5111 |
} else {
|
jaroslav@68
|
5112 |
int i;
|
jaroslav@68
|
5113 |
for (i = codePointOffset; x > 0 && i < 0; i++) {
|
jaroslav@68
|
5114 |
if (isLowSurrogate(seq.charAt(--x)) && x > 0 &&
|
jaroslav@68
|
5115 |
isHighSurrogate(seq.charAt(x-1))) {
|
jaroslav@68
|
5116 |
x--;
|
jaroslav@68
|
5117 |
}
|
jaroslav@68
|
5118 |
}
|
jaroslav@68
|
5119 |
if (i < 0) {
|
jaroslav@68
|
5120 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5121 |
}
|
jaroslav@68
|
5122 |
}
|
jaroslav@68
|
5123 |
return x;
|
jaroslav@68
|
5124 |
}
|
jaroslav@68
|
5125 |
|
jaroslav@68
|
5126 |
/**
|
jaroslav@68
|
5127 |
* Returns the index within the given {@code char} subarray
|
jaroslav@68
|
5128 |
* that is offset from the given {@code index} by
|
jaroslav@68
|
5129 |
* {@code codePointOffset} code points. The
|
jaroslav@68
|
5130 |
* {@code start} and {@code count} arguments specify a
|
jaroslav@68
|
5131 |
* subarray of the {@code char} array. Unpaired surrogates
|
jaroslav@68
|
5132 |
* within the text range given by {@code index} and
|
jaroslav@68
|
5133 |
* {@code codePointOffset} count as one code point each.
|
jaroslav@68
|
5134 |
*
|
jaroslav@68
|
5135 |
* @param a the {@code char} array
|
jaroslav@68
|
5136 |
* @param start the index of the first {@code char} of the
|
jaroslav@68
|
5137 |
* subarray
|
jaroslav@68
|
5138 |
* @param count the length of the subarray in {@code char}s
|
jaroslav@68
|
5139 |
* @param index the index to be offset
|
jaroslav@68
|
5140 |
* @param codePointOffset the offset in code points
|
jaroslav@68
|
5141 |
* @return the index within the subarray
|
jaroslav@68
|
5142 |
* @exception NullPointerException if {@code a} is null.
|
jaroslav@68
|
5143 |
* @exception IndexOutOfBoundsException
|
jaroslav@68
|
5144 |
* if {@code start} or {@code count} is negative,
|
jaroslav@68
|
5145 |
* or if {@code start + count} is larger than the length of
|
jaroslav@68
|
5146 |
* the given array,
|
jaroslav@68
|
5147 |
* or if {@code index} is less than {@code start} or
|
jaroslav@68
|
5148 |
* larger then {@code start + count},
|
jaroslav@68
|
5149 |
* or if {@code codePointOffset} is positive and the text range
|
jaroslav@68
|
5150 |
* starting with {@code index} and ending with {@code start + count - 1}
|
jaroslav@68
|
5151 |
* has fewer than {@code codePointOffset} code
|
jaroslav@68
|
5152 |
* points,
|
jaroslav@68
|
5153 |
* or if {@code codePointOffset} is negative and the text range
|
jaroslav@68
|
5154 |
* starting with {@code start} and ending with {@code index - 1}
|
jaroslav@68
|
5155 |
* has fewer than the absolute value of
|
jaroslav@68
|
5156 |
* {@code codePointOffset} code points.
|
jaroslav@68
|
5157 |
* @since 1.5
|
jaroslav@68
|
5158 |
*/
|
jaroslav@68
|
5159 |
public static int offsetByCodePoints(char[] a, int start, int count,
|
jaroslav@68
|
5160 |
int index, int codePointOffset) {
|
jaroslav@68
|
5161 |
if (count > a.length-start || start < 0 || count < 0
|
jaroslav@68
|
5162 |
|| index < start || index > start+count) {
|
jaroslav@68
|
5163 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5164 |
}
|
jaroslav@68
|
5165 |
return offsetByCodePointsImpl(a, start, count, index, codePointOffset);
|
jaroslav@68
|
5166 |
}
|
jaroslav@68
|
5167 |
|
jaroslav@68
|
5168 |
static int offsetByCodePointsImpl(char[]a, int start, int count,
|
jaroslav@68
|
5169 |
int index, int codePointOffset) {
|
jaroslav@68
|
5170 |
int x = index;
|
jaroslav@68
|
5171 |
if (codePointOffset >= 0) {
|
jaroslav@68
|
5172 |
int limit = start + count;
|
jaroslav@68
|
5173 |
int i;
|
jaroslav@68
|
5174 |
for (i = 0; x < limit && i < codePointOffset; i++) {
|
jaroslav@68
|
5175 |
if (isHighSurrogate(a[x++]) && x < limit &&
|
jaroslav@68
|
5176 |
isLowSurrogate(a[x])) {
|
jaroslav@68
|
5177 |
x++;
|
jaroslav@68
|
5178 |
}
|
jaroslav@68
|
5179 |
}
|
jaroslav@68
|
5180 |
if (i < codePointOffset) {
|
jaroslav@68
|
5181 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5182 |
}
|
jaroslav@68
|
5183 |
} else {
|
jaroslav@68
|
5184 |
int i;
|
jaroslav@68
|
5185 |
for (i = codePointOffset; x > start && i < 0; i++) {
|
jaroslav@68
|
5186 |
if (isLowSurrogate(a[--x]) && x > start &&
|
jaroslav@68
|
5187 |
isHighSurrogate(a[x-1])) {
|
jaroslav@68
|
5188 |
x--;
|
jaroslav@68
|
5189 |
}
|
jaroslav@68
|
5190 |
}
|
jaroslav@68
|
5191 |
if (i < 0) {
|
jaroslav@68
|
5192 |
throw new IndexOutOfBoundsException();
|
jaroslav@68
|
5193 |
}
|
jaroslav@68
|
5194 |
}
|
jaroslav@68
|
5195 |
return x;
|
jaroslav@68
|
5196 |
}
|
jaroslav@68
|
5197 |
|
jaroslav@68
|
5198 |
/**
|
jaroslav@68
|
5199 |
* Determines if the specified character is a lowercase character.
|
jaroslav@68
|
5200 |
* <p>
|
jaroslav@68
|
5201 |
* A character is lowercase if its general category type, provided
|
jaroslav@68
|
5202 |
* by {@code Character.getType(ch)}, is
|
jaroslav@68
|
5203 |
* {@code LOWERCASE_LETTER}, or it has contributory property
|
jaroslav@68
|
5204 |
* Other_Lowercase as defined by the Unicode Standard.
|
jaroslav@68
|
5205 |
* <p>
|
jaroslav@68
|
5206 |
* The following are examples of lowercase characters:
|
jaroslav@68
|
5207 |
* <p><blockquote><pre>
|
jaroslav@68
|
5208 |
* a b c d e f g h i j k l m n o p q r s t u v w x y z
|
jaroslav@68
|
5209 |
* '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
|
jaroslav@68
|
5210 |
* '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
|
jaroslav@68
|
5211 |
* '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
|
jaroslav@68
|
5212 |
* '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
|
jaroslav@68
|
5213 |
* </pre></blockquote>
|
jaroslav@68
|
5214 |
* <p> Many other Unicode characters are lowercase too.
|
jaroslav@68
|
5215 |
*
|
jaroslav@68
|
5216 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5217 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5218 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5219 |
* the {@link #isLowerCase(int)} method.
|
jaroslav@68
|
5220 |
*
|
jaroslav@68
|
5221 |
* @param ch the character to be tested.
|
jaroslav@68
|
5222 |
* @return {@code true} if the character is lowercase;
|
jaroslav@68
|
5223 |
* {@code false} otherwise.
|
jaroslav@68
|
5224 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
5225 |
* @see Character#isTitleCase(char)
|
jaroslav@68
|
5226 |
* @see Character#toLowerCase(char)
|
jaroslav@68
|
5227 |
* @see Character#getType(char)
|
jaroslav@68
|
5228 |
*/
|
jaroslav@68
|
5229 |
public static boolean isLowerCase(char ch) {
|
jaroslav@68
|
5230 |
return isLowerCase((int)ch);
|
jaroslav@68
|
5231 |
}
|
jaroslav@68
|
5232 |
|
jaroslav@68
|
5233 |
/**
|
jaroslav@68
|
5234 |
* Determines if the specified character (Unicode code point) is a
|
jaroslav@68
|
5235 |
* lowercase character.
|
jaroslav@68
|
5236 |
* <p>
|
jaroslav@68
|
5237 |
* A character is lowercase if its general category type, provided
|
jaroslav@68
|
5238 |
* by {@link Character#getType getType(codePoint)}, is
|
jaroslav@68
|
5239 |
* {@code LOWERCASE_LETTER}, or it has contributory property
|
jaroslav@68
|
5240 |
* Other_Lowercase as defined by the Unicode Standard.
|
jaroslav@68
|
5241 |
* <p>
|
jaroslav@68
|
5242 |
* The following are examples of lowercase characters:
|
jaroslav@68
|
5243 |
* <p><blockquote><pre>
|
jaroslav@68
|
5244 |
* a b c d e f g h i j k l m n o p q r s t u v w x y z
|
jaroslav@68
|
5245 |
* '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
|
jaroslav@68
|
5246 |
* '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
|
jaroslav@68
|
5247 |
* '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
|
jaroslav@68
|
5248 |
* '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
|
jaroslav@68
|
5249 |
* </pre></blockquote>
|
jaroslav@68
|
5250 |
* <p> Many other Unicode characters are lowercase too.
|
jaroslav@68
|
5251 |
*
|
jaroslav@68
|
5252 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5253 |
* @return {@code true} if the character is lowercase;
|
jaroslav@68
|
5254 |
* {@code false} otherwise.
|
jaroslav@68
|
5255 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
5256 |
* @see Character#isTitleCase(int)
|
jaroslav@68
|
5257 |
* @see Character#toLowerCase(int)
|
jaroslav@68
|
5258 |
* @see Character#getType(int)
|
jaroslav@68
|
5259 |
* @since 1.5
|
jaroslav@68
|
5260 |
*/
|
jaroslav@68
|
5261 |
public static boolean isLowerCase(int codePoint) {
|
jaroslav@68
|
5262 |
return getType(codePoint) == Character.LOWERCASE_LETTER ||
|
jaroslav@68
|
5263 |
CharacterData.of(codePoint).isOtherLowercase(codePoint);
|
jaroslav@68
|
5264 |
}
|
jaroslav@68
|
5265 |
|
jaroslav@68
|
5266 |
/**
|
jaroslav@68
|
5267 |
* Determines if the specified character is an uppercase character.
|
jaroslav@68
|
5268 |
* <p>
|
jaroslav@68
|
5269 |
* A character is uppercase if its general category type, provided by
|
jaroslav@68
|
5270 |
* {@code Character.getType(ch)}, is {@code UPPERCASE_LETTER}.
|
jaroslav@68
|
5271 |
* or it has contributory property Other_Uppercase as defined by the Unicode Standard.
|
jaroslav@68
|
5272 |
* <p>
|
jaroslav@68
|
5273 |
* The following are examples of uppercase characters:
|
jaroslav@68
|
5274 |
* <p><blockquote><pre>
|
jaroslav@68
|
5275 |
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
jaroslav@68
|
5276 |
* '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7'
|
jaroslav@68
|
5277 |
* '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF'
|
jaroslav@68
|
5278 |
* '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8'
|
jaroslav@68
|
5279 |
* '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE'
|
jaroslav@68
|
5280 |
* </pre></blockquote>
|
jaroslav@68
|
5281 |
* <p> Many other Unicode characters are uppercase too.<p>
|
jaroslav@68
|
5282 |
*
|
jaroslav@68
|
5283 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5284 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5285 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5286 |
* the {@link #isUpperCase(int)} method.
|
jaroslav@68
|
5287 |
*
|
jaroslav@68
|
5288 |
* @param ch the character to be tested.
|
jaroslav@68
|
5289 |
* @return {@code true} if the character is uppercase;
|
jaroslav@68
|
5290 |
* {@code false} otherwise.
|
jaroslav@68
|
5291 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
5292 |
* @see Character#isTitleCase(char)
|
jaroslav@68
|
5293 |
* @see Character#toUpperCase(char)
|
jaroslav@68
|
5294 |
* @see Character#getType(char)
|
jaroslav@68
|
5295 |
* @since 1.0
|
jaroslav@68
|
5296 |
*/
|
jaroslav@68
|
5297 |
public static boolean isUpperCase(char ch) {
|
jaroslav@68
|
5298 |
return isUpperCase((int)ch);
|
jaroslav@68
|
5299 |
}
|
jaroslav@68
|
5300 |
|
jaroslav@68
|
5301 |
/**
|
jaroslav@68
|
5302 |
* Determines if the specified character (Unicode code point) is an uppercase character.
|
jaroslav@68
|
5303 |
* <p>
|
jaroslav@68
|
5304 |
* A character is uppercase if its general category type, provided by
|
jaroslav@68
|
5305 |
* {@link Character#getType(int) getType(codePoint)}, is {@code UPPERCASE_LETTER},
|
jaroslav@68
|
5306 |
* or it has contributory property Other_Uppercase as defined by the Unicode Standard.
|
jaroslav@68
|
5307 |
* <p>
|
jaroslav@68
|
5308 |
* The following are examples of uppercase characters:
|
jaroslav@68
|
5309 |
* <p><blockquote><pre>
|
jaroslav@68
|
5310 |
* A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
jaroslav@68
|
5311 |
* '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7'
|
jaroslav@68
|
5312 |
* '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF'
|
jaroslav@68
|
5313 |
* '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8'
|
jaroslav@68
|
5314 |
* '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE'
|
jaroslav@68
|
5315 |
* </pre></blockquote>
|
jaroslav@68
|
5316 |
* <p> Many other Unicode characters are uppercase too.<p>
|
jaroslav@68
|
5317 |
*
|
jaroslav@68
|
5318 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5319 |
* @return {@code true} if the character is uppercase;
|
jaroslav@68
|
5320 |
* {@code false} otherwise.
|
jaroslav@68
|
5321 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
5322 |
* @see Character#isTitleCase(int)
|
jaroslav@68
|
5323 |
* @see Character#toUpperCase(int)
|
jaroslav@68
|
5324 |
* @see Character#getType(int)
|
jaroslav@68
|
5325 |
* @since 1.5
|
jaroslav@68
|
5326 |
*/
|
jaroslav@68
|
5327 |
public static boolean isUpperCase(int codePoint) {
|
jaroslav@68
|
5328 |
return getType(codePoint) == Character.UPPERCASE_LETTER ||
|
jaroslav@68
|
5329 |
CharacterData.of(codePoint).isOtherUppercase(codePoint);
|
jaroslav@68
|
5330 |
}
|
jaroslav@68
|
5331 |
|
jaroslav@68
|
5332 |
/**
|
jaroslav@68
|
5333 |
* Determines if the specified character is a titlecase character.
|
jaroslav@68
|
5334 |
* <p>
|
jaroslav@68
|
5335 |
* A character is a titlecase character if its general
|
jaroslav@68
|
5336 |
* category type, provided by {@code Character.getType(ch)},
|
jaroslav@68
|
5337 |
* is {@code TITLECASE_LETTER}.
|
jaroslav@68
|
5338 |
* <p>
|
jaroslav@68
|
5339 |
* Some characters look like pairs of Latin letters. For example, there
|
jaroslav@68
|
5340 |
* is an uppercase letter that looks like "LJ" and has a corresponding
|
jaroslav@68
|
5341 |
* lowercase letter that looks like "lj". A third form, which looks like "Lj",
|
jaroslav@68
|
5342 |
* is the appropriate form to use when rendering a word in lowercase
|
jaroslav@68
|
5343 |
* with initial capitals, as for a book title.
|
jaroslav@68
|
5344 |
* <p>
|
jaroslav@68
|
5345 |
* These are some of the Unicode characters for which this method returns
|
jaroslav@68
|
5346 |
* {@code true}:
|
jaroslav@68
|
5347 |
* <ul>
|
jaroslav@68
|
5348 |
* <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON}
|
jaroslav@68
|
5349 |
* <li>{@code LATIN CAPITAL LETTER L WITH SMALL LETTER J}
|
jaroslav@68
|
5350 |
* <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J}
|
jaroslav@68
|
5351 |
* <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z}
|
jaroslav@68
|
5352 |
* </ul>
|
jaroslav@68
|
5353 |
* <p> Many other Unicode characters are titlecase too.<p>
|
jaroslav@68
|
5354 |
*
|
jaroslav@68
|
5355 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5356 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5357 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5358 |
* the {@link #isTitleCase(int)} method.
|
jaroslav@68
|
5359 |
*
|
jaroslav@68
|
5360 |
* @param ch the character to be tested.
|
jaroslav@68
|
5361 |
* @return {@code true} if the character is titlecase;
|
jaroslav@68
|
5362 |
* {@code false} otherwise.
|
jaroslav@68
|
5363 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
5364 |
* @see Character#isUpperCase(char)
|
jaroslav@68
|
5365 |
* @see Character#toTitleCase(char)
|
jaroslav@68
|
5366 |
* @see Character#getType(char)
|
jaroslav@68
|
5367 |
* @since 1.0.2
|
jaroslav@68
|
5368 |
*/
|
jaroslav@68
|
5369 |
public static boolean isTitleCase(char ch) {
|
jaroslav@68
|
5370 |
return isTitleCase((int)ch);
|
jaroslav@68
|
5371 |
}
|
jaroslav@68
|
5372 |
|
jaroslav@68
|
5373 |
/**
|
jaroslav@68
|
5374 |
* Determines if the specified character (Unicode code point) is a titlecase character.
|
jaroslav@68
|
5375 |
* <p>
|
jaroslav@68
|
5376 |
* A character is a titlecase character if its general
|
jaroslav@68
|
5377 |
* category type, provided by {@link Character#getType(int) getType(codePoint)},
|
jaroslav@68
|
5378 |
* is {@code TITLECASE_LETTER}.
|
jaroslav@68
|
5379 |
* <p>
|
jaroslav@68
|
5380 |
* Some characters look like pairs of Latin letters. For example, there
|
jaroslav@68
|
5381 |
* is an uppercase letter that looks like "LJ" and has a corresponding
|
jaroslav@68
|
5382 |
* lowercase letter that looks like "lj". A third form, which looks like "Lj",
|
jaroslav@68
|
5383 |
* is the appropriate form to use when rendering a word in lowercase
|
jaroslav@68
|
5384 |
* with initial capitals, as for a book title.
|
jaroslav@68
|
5385 |
* <p>
|
jaroslav@68
|
5386 |
* These are some of the Unicode characters for which this method returns
|
jaroslav@68
|
5387 |
* {@code true}:
|
jaroslav@68
|
5388 |
* <ul>
|
jaroslav@68
|
5389 |
* <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON}
|
jaroslav@68
|
5390 |
* <li>{@code LATIN CAPITAL LETTER L WITH SMALL LETTER J}
|
jaroslav@68
|
5391 |
* <li>{@code LATIN CAPITAL LETTER N WITH SMALL LETTER J}
|
jaroslav@68
|
5392 |
* <li>{@code LATIN CAPITAL LETTER D WITH SMALL LETTER Z}
|
jaroslav@68
|
5393 |
* </ul>
|
jaroslav@68
|
5394 |
* <p> Many other Unicode characters are titlecase too.<p>
|
jaroslav@68
|
5395 |
*
|
jaroslav@68
|
5396 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5397 |
* @return {@code true} if the character is titlecase;
|
jaroslav@68
|
5398 |
* {@code false} otherwise.
|
jaroslav@68
|
5399 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
5400 |
* @see Character#isUpperCase(int)
|
jaroslav@68
|
5401 |
* @see Character#toTitleCase(int)
|
jaroslav@68
|
5402 |
* @see Character#getType(int)
|
jaroslav@68
|
5403 |
* @since 1.5
|
jaroslav@68
|
5404 |
*/
|
jaroslav@68
|
5405 |
public static boolean isTitleCase(int codePoint) {
|
jaroslav@68
|
5406 |
return getType(codePoint) == Character.TITLECASE_LETTER;
|
jaroslav@68
|
5407 |
}
|
jaroslav@68
|
5408 |
|
jaroslav@68
|
5409 |
/**
|
jaroslav@68
|
5410 |
* Determines if the specified character is a digit.
|
jaroslav@68
|
5411 |
* <p>
|
jaroslav@68
|
5412 |
* A character is a digit if its general category type, provided
|
jaroslav@68
|
5413 |
* by {@code Character.getType(ch)}, is
|
jaroslav@68
|
5414 |
* {@code DECIMAL_DIGIT_NUMBER}.
|
jaroslav@68
|
5415 |
* <p>
|
jaroslav@68
|
5416 |
* Some Unicode character ranges that contain digits:
|
jaroslav@68
|
5417 |
* <ul>
|
jaroslav@68
|
5418 |
* <li>{@code '\u005Cu0030'} through {@code '\u005Cu0039'},
|
jaroslav@68
|
5419 |
* ISO-LATIN-1 digits ({@code '0'} through {@code '9'})
|
jaroslav@68
|
5420 |
* <li>{@code '\u005Cu0660'} through {@code '\u005Cu0669'},
|
jaroslav@68
|
5421 |
* Arabic-Indic digits
|
jaroslav@68
|
5422 |
* <li>{@code '\u005Cu06F0'} through {@code '\u005Cu06F9'},
|
jaroslav@68
|
5423 |
* Extended Arabic-Indic digits
|
jaroslav@68
|
5424 |
* <li>{@code '\u005Cu0966'} through {@code '\u005Cu096F'},
|
jaroslav@68
|
5425 |
* Devanagari digits
|
jaroslav@68
|
5426 |
* <li>{@code '\u005CuFF10'} through {@code '\u005CuFF19'},
|
jaroslav@68
|
5427 |
* Fullwidth digits
|
jaroslav@68
|
5428 |
* </ul>
|
jaroslav@68
|
5429 |
*
|
jaroslav@68
|
5430 |
* Many other character ranges contain digits as well.
|
jaroslav@68
|
5431 |
*
|
jaroslav@68
|
5432 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5433 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5434 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5435 |
* the {@link #isDigit(int)} method.
|
jaroslav@68
|
5436 |
*
|
jaroslav@68
|
5437 |
* @param ch the character to be tested.
|
jaroslav@68
|
5438 |
* @return {@code true} if the character is a digit;
|
jaroslav@68
|
5439 |
* {@code false} otherwise.
|
jaroslav@68
|
5440 |
* @see Character#digit(char, int)
|
jaroslav@68
|
5441 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
5442 |
* @see Character#getType(char)
|
jaroslav@68
|
5443 |
*/
|
jaroslav@68
|
5444 |
public static boolean isDigit(char ch) {
|
jaroslav@68
|
5445 |
return isDigit((int)ch);
|
jaroslav@68
|
5446 |
}
|
jaroslav@68
|
5447 |
|
jaroslav@68
|
5448 |
/**
|
jaroslav@68
|
5449 |
* Determines if the specified character (Unicode code point) is a digit.
|
jaroslav@68
|
5450 |
* <p>
|
jaroslav@68
|
5451 |
* A character is a digit if its general category type, provided
|
jaroslav@68
|
5452 |
* by {@link Character#getType(int) getType(codePoint)}, is
|
jaroslav@68
|
5453 |
* {@code DECIMAL_DIGIT_NUMBER}.
|
jaroslav@68
|
5454 |
* <p>
|
jaroslav@68
|
5455 |
* Some Unicode character ranges that contain digits:
|
jaroslav@68
|
5456 |
* <ul>
|
jaroslav@68
|
5457 |
* <li>{@code '\u005Cu0030'} through {@code '\u005Cu0039'},
|
jaroslav@68
|
5458 |
* ISO-LATIN-1 digits ({@code '0'} through {@code '9'})
|
jaroslav@68
|
5459 |
* <li>{@code '\u005Cu0660'} through {@code '\u005Cu0669'},
|
jaroslav@68
|
5460 |
* Arabic-Indic digits
|
jaroslav@68
|
5461 |
* <li>{@code '\u005Cu06F0'} through {@code '\u005Cu06F9'},
|
jaroslav@68
|
5462 |
* Extended Arabic-Indic digits
|
jaroslav@68
|
5463 |
* <li>{@code '\u005Cu0966'} through {@code '\u005Cu096F'},
|
jaroslav@68
|
5464 |
* Devanagari digits
|
jaroslav@68
|
5465 |
* <li>{@code '\u005CuFF10'} through {@code '\u005CuFF19'},
|
jaroslav@68
|
5466 |
* Fullwidth digits
|
jaroslav@68
|
5467 |
* </ul>
|
jaroslav@68
|
5468 |
*
|
jaroslav@68
|
5469 |
* Many other character ranges contain digits as well.
|
jaroslav@68
|
5470 |
*
|
jaroslav@68
|
5471 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5472 |
* @return {@code true} if the character is a digit;
|
jaroslav@68
|
5473 |
* {@code false} otherwise.
|
jaroslav@68
|
5474 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
5475 |
* @see Character#getType(int)
|
jaroslav@68
|
5476 |
* @since 1.5
|
jaroslav@68
|
5477 |
*/
|
jaroslav@68
|
5478 |
public static boolean isDigit(int codePoint) {
|
jaroslav@68
|
5479 |
return getType(codePoint) == Character.DECIMAL_DIGIT_NUMBER;
|
jaroslav@68
|
5480 |
}
|
jaroslav@68
|
5481 |
|
jaroslav@68
|
5482 |
/**
|
jaroslav@68
|
5483 |
* Determines if a character is defined in Unicode.
|
jaroslav@68
|
5484 |
* <p>
|
jaroslav@68
|
5485 |
* A character is defined if at least one of the following is true:
|
jaroslav@68
|
5486 |
* <ul>
|
jaroslav@68
|
5487 |
* <li>It has an entry in the UnicodeData file.
|
jaroslav@68
|
5488 |
* <li>It has a value in a range defined by the UnicodeData file.
|
jaroslav@68
|
5489 |
* </ul>
|
jaroslav@68
|
5490 |
*
|
jaroslav@68
|
5491 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5492 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5493 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5494 |
* the {@link #isDefined(int)} method.
|
jaroslav@68
|
5495 |
*
|
jaroslav@68
|
5496 |
* @param ch the character to be tested
|
jaroslav@68
|
5497 |
* @return {@code true} if the character has a defined meaning
|
jaroslav@68
|
5498 |
* in Unicode; {@code false} otherwise.
|
jaroslav@68
|
5499 |
* @see Character#isDigit(char)
|
jaroslav@68
|
5500 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5501 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5502 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
5503 |
* @see Character#isTitleCase(char)
|
jaroslav@68
|
5504 |
* @see Character#isUpperCase(char)
|
jaroslav@68
|
5505 |
* @since 1.0.2
|
jaroslav@68
|
5506 |
*/
|
jaroslav@68
|
5507 |
public static boolean isDefined(char ch) {
|
jaroslav@68
|
5508 |
return isDefined((int)ch);
|
jaroslav@68
|
5509 |
}
|
jaroslav@68
|
5510 |
|
jaroslav@68
|
5511 |
/**
|
jaroslav@68
|
5512 |
* Determines if a character (Unicode code point) is defined in Unicode.
|
jaroslav@68
|
5513 |
* <p>
|
jaroslav@68
|
5514 |
* A character is defined if at least one of the following is true:
|
jaroslav@68
|
5515 |
* <ul>
|
jaroslav@68
|
5516 |
* <li>It has an entry in the UnicodeData file.
|
jaroslav@68
|
5517 |
* <li>It has a value in a range defined by the UnicodeData file.
|
jaroslav@68
|
5518 |
* </ul>
|
jaroslav@68
|
5519 |
*
|
jaroslav@68
|
5520 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5521 |
* @return {@code true} if the character has a defined meaning
|
jaroslav@68
|
5522 |
* in Unicode; {@code false} otherwise.
|
jaroslav@68
|
5523 |
* @see Character#isDigit(int)
|
jaroslav@68
|
5524 |
* @see Character#isLetter(int)
|
jaroslav@68
|
5525 |
* @see Character#isLetterOrDigit(int)
|
jaroslav@68
|
5526 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
5527 |
* @see Character#isTitleCase(int)
|
jaroslav@68
|
5528 |
* @see Character#isUpperCase(int)
|
jaroslav@68
|
5529 |
* @since 1.5
|
jaroslav@68
|
5530 |
*/
|
jaroslav@68
|
5531 |
public static boolean isDefined(int codePoint) {
|
jaroslav@68
|
5532 |
return getType(codePoint) != Character.UNASSIGNED;
|
jaroslav@68
|
5533 |
}
|
jaroslav@68
|
5534 |
|
jaroslav@68
|
5535 |
/**
|
jaroslav@68
|
5536 |
* Determines if the specified character is a letter.
|
jaroslav@68
|
5537 |
* <p>
|
jaroslav@68
|
5538 |
* A character is considered to be a letter if its general
|
jaroslav@68
|
5539 |
* category type, provided by {@code Character.getType(ch)},
|
jaroslav@68
|
5540 |
* is any of the following:
|
jaroslav@68
|
5541 |
* <ul>
|
jaroslav@68
|
5542 |
* <li> {@code UPPERCASE_LETTER}
|
jaroslav@68
|
5543 |
* <li> {@code LOWERCASE_LETTER}
|
jaroslav@68
|
5544 |
* <li> {@code TITLECASE_LETTER}
|
jaroslav@68
|
5545 |
* <li> {@code MODIFIER_LETTER}
|
jaroslav@68
|
5546 |
* <li> {@code OTHER_LETTER}
|
jaroslav@68
|
5547 |
* </ul>
|
jaroslav@68
|
5548 |
*
|
jaroslav@68
|
5549 |
* Not all letters have case. Many characters are
|
jaroslav@68
|
5550 |
* letters but are neither uppercase nor lowercase nor titlecase.
|
jaroslav@68
|
5551 |
*
|
jaroslav@68
|
5552 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5553 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5554 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5555 |
* the {@link #isLetter(int)} method.
|
jaroslav@68
|
5556 |
*
|
jaroslav@68
|
5557 |
* @param ch the character to be tested.
|
jaroslav@68
|
5558 |
* @return {@code true} if the character is a letter;
|
jaroslav@68
|
5559 |
* {@code false} otherwise.
|
jaroslav@68
|
5560 |
* @see Character#isDigit(char)
|
jaroslav@68
|
5561 |
* @see Character#isJavaIdentifierStart(char)
|
jaroslav@68
|
5562 |
* @see Character#isJavaLetter(char)
|
jaroslav@68
|
5563 |
* @see Character#isJavaLetterOrDigit(char)
|
jaroslav@68
|
5564 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5565 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
5566 |
* @see Character#isTitleCase(char)
|
jaroslav@68
|
5567 |
* @see Character#isUnicodeIdentifierStart(char)
|
jaroslav@68
|
5568 |
* @see Character#isUpperCase(char)
|
jaroslav@68
|
5569 |
*/
|
jaroslav@68
|
5570 |
public static boolean isLetter(char ch) {
|
jaroslav@68
|
5571 |
return isLetter((int)ch);
|
jaroslav@68
|
5572 |
}
|
jaroslav@68
|
5573 |
|
jaroslav@68
|
5574 |
/**
|
jaroslav@68
|
5575 |
* Determines if the specified character (Unicode code point) is a letter.
|
jaroslav@68
|
5576 |
* <p>
|
jaroslav@68
|
5577 |
* A character is considered to be a letter if its general
|
jaroslav@68
|
5578 |
* category type, provided by {@link Character#getType(int) getType(codePoint)},
|
jaroslav@68
|
5579 |
* is any of the following:
|
jaroslav@68
|
5580 |
* <ul>
|
jaroslav@68
|
5581 |
* <li> {@code UPPERCASE_LETTER}
|
jaroslav@68
|
5582 |
* <li> {@code LOWERCASE_LETTER}
|
jaroslav@68
|
5583 |
* <li> {@code TITLECASE_LETTER}
|
jaroslav@68
|
5584 |
* <li> {@code MODIFIER_LETTER}
|
jaroslav@68
|
5585 |
* <li> {@code OTHER_LETTER}
|
jaroslav@68
|
5586 |
* </ul>
|
jaroslav@68
|
5587 |
*
|
jaroslav@68
|
5588 |
* Not all letters have case. Many characters are
|
jaroslav@68
|
5589 |
* letters but are neither uppercase nor lowercase nor titlecase.
|
jaroslav@68
|
5590 |
*
|
jaroslav@68
|
5591 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5592 |
* @return {@code true} if the character is a letter;
|
jaroslav@68
|
5593 |
* {@code false} otherwise.
|
jaroslav@68
|
5594 |
* @see Character#isDigit(int)
|
jaroslav@68
|
5595 |
* @see Character#isJavaIdentifierStart(int)
|
jaroslav@68
|
5596 |
* @see Character#isLetterOrDigit(int)
|
jaroslav@68
|
5597 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
5598 |
* @see Character#isTitleCase(int)
|
jaroslav@68
|
5599 |
* @see Character#isUnicodeIdentifierStart(int)
|
jaroslav@68
|
5600 |
* @see Character#isUpperCase(int)
|
jaroslav@68
|
5601 |
* @since 1.5
|
jaroslav@68
|
5602 |
*/
|
jaroslav@68
|
5603 |
public static boolean isLetter(int codePoint) {
|
jaroslav@68
|
5604 |
return ((((1 << Character.UPPERCASE_LETTER) |
|
jaroslav@68
|
5605 |
(1 << Character.LOWERCASE_LETTER) |
|
jaroslav@68
|
5606 |
(1 << Character.TITLECASE_LETTER) |
|
jaroslav@68
|
5607 |
(1 << Character.MODIFIER_LETTER) |
|
jaroslav@68
|
5608 |
(1 << Character.OTHER_LETTER)) >> getType(codePoint)) & 1)
|
jaroslav@68
|
5609 |
!= 0;
|
jaroslav@68
|
5610 |
}
|
jaroslav@68
|
5611 |
|
jaroslav@68
|
5612 |
/**
|
jaroslav@68
|
5613 |
* Determines if the specified character is a letter or digit.
|
jaroslav@68
|
5614 |
* <p>
|
jaroslav@68
|
5615 |
* A character is considered to be a letter or digit if either
|
jaroslav@68
|
5616 |
* {@code Character.isLetter(char ch)} or
|
jaroslav@68
|
5617 |
* {@code Character.isDigit(char ch)} returns
|
jaroslav@68
|
5618 |
* {@code true} for the character.
|
jaroslav@68
|
5619 |
*
|
jaroslav@68
|
5620 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5621 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5622 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5623 |
* the {@link #isLetterOrDigit(int)} method.
|
jaroslav@68
|
5624 |
*
|
jaroslav@68
|
5625 |
* @param ch the character to be tested.
|
jaroslav@68
|
5626 |
* @return {@code true} if the character is a letter or digit;
|
jaroslav@68
|
5627 |
* {@code false} otherwise.
|
jaroslav@68
|
5628 |
* @see Character#isDigit(char)
|
jaroslav@68
|
5629 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
5630 |
* @see Character#isJavaLetter(char)
|
jaroslav@68
|
5631 |
* @see Character#isJavaLetterOrDigit(char)
|
jaroslav@68
|
5632 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5633 |
* @see Character#isUnicodeIdentifierPart(char)
|
jaroslav@68
|
5634 |
* @since 1.0.2
|
jaroslav@68
|
5635 |
*/
|
jaroslav@68
|
5636 |
public static boolean isLetterOrDigit(char ch) {
|
jaroslav@68
|
5637 |
return isLetterOrDigit((int)ch);
|
jaroslav@68
|
5638 |
}
|
jaroslav@68
|
5639 |
|
jaroslav@68
|
5640 |
/**
|
jaroslav@68
|
5641 |
* Determines if the specified character (Unicode code point) is a letter or digit.
|
jaroslav@68
|
5642 |
* <p>
|
jaroslav@68
|
5643 |
* A character is considered to be a letter or digit if either
|
jaroslav@68
|
5644 |
* {@link #isLetter(int) isLetter(codePoint)} or
|
jaroslav@68
|
5645 |
* {@link #isDigit(int) isDigit(codePoint)} returns
|
jaroslav@68
|
5646 |
* {@code true} for the character.
|
jaroslav@68
|
5647 |
*
|
jaroslav@68
|
5648 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5649 |
* @return {@code true} if the character is a letter or digit;
|
jaroslav@68
|
5650 |
* {@code false} otherwise.
|
jaroslav@68
|
5651 |
* @see Character#isDigit(int)
|
jaroslav@68
|
5652 |
* @see Character#isJavaIdentifierPart(int)
|
jaroslav@68
|
5653 |
* @see Character#isLetter(int)
|
jaroslav@68
|
5654 |
* @see Character#isUnicodeIdentifierPart(int)
|
jaroslav@68
|
5655 |
* @since 1.5
|
jaroslav@68
|
5656 |
*/
|
jaroslav@68
|
5657 |
public static boolean isLetterOrDigit(int codePoint) {
|
jaroslav@68
|
5658 |
return ((((1 << Character.UPPERCASE_LETTER) |
|
jaroslav@68
|
5659 |
(1 << Character.LOWERCASE_LETTER) |
|
jaroslav@68
|
5660 |
(1 << Character.TITLECASE_LETTER) |
|
jaroslav@68
|
5661 |
(1 << Character.MODIFIER_LETTER) |
|
jaroslav@68
|
5662 |
(1 << Character.OTHER_LETTER) |
|
jaroslav@68
|
5663 |
(1 << Character.DECIMAL_DIGIT_NUMBER)) >> getType(codePoint)) & 1)
|
jaroslav@68
|
5664 |
!= 0;
|
jaroslav@68
|
5665 |
}
|
jaroslav@68
|
5666 |
|
jaroslav@68
|
5667 |
/**
|
jaroslav@68
|
5668 |
* Determines if the specified character is permissible as the first
|
jaroslav@68
|
5669 |
* character in a Java identifier.
|
jaroslav@68
|
5670 |
* <p>
|
jaroslav@68
|
5671 |
* A character may start a Java identifier if and only if
|
jaroslav@68
|
5672 |
* one of the following is true:
|
jaroslav@68
|
5673 |
* <ul>
|
jaroslav@68
|
5674 |
* <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
|
jaroslav@68
|
5675 |
* <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER}
|
jaroslav@68
|
5676 |
* <li> {@code ch} is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5677 |
* <li> {@code ch} is a connecting punctuation character (such as {@code '_'}).
|
jaroslav@68
|
5678 |
* </ul>
|
jaroslav@68
|
5679 |
*
|
jaroslav@68
|
5680 |
* @param ch the character to be tested.
|
jaroslav@68
|
5681 |
* @return {@code true} if the character may start a Java
|
jaroslav@68
|
5682 |
* identifier; {@code false} otherwise.
|
jaroslav@68
|
5683 |
* @see Character#isJavaLetterOrDigit(char)
|
jaroslav@68
|
5684 |
* @see Character#isJavaIdentifierStart(char)
|
jaroslav@68
|
5685 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
5686 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5687 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5688 |
* @see Character#isUnicodeIdentifierStart(char)
|
jaroslav@68
|
5689 |
* @since 1.02
|
jaroslav@68
|
5690 |
* @deprecated Replaced by isJavaIdentifierStart(char).
|
jaroslav@68
|
5691 |
*/
|
jaroslav@68
|
5692 |
@Deprecated
|
jaroslav@68
|
5693 |
public static boolean isJavaLetter(char ch) {
|
jaroslav@68
|
5694 |
return isJavaIdentifierStart(ch);
|
jaroslav@68
|
5695 |
}
|
jaroslav@68
|
5696 |
|
jaroslav@68
|
5697 |
/**
|
jaroslav@68
|
5698 |
* Determines if the specified character may be part of a Java
|
jaroslav@68
|
5699 |
* identifier as other than the first character.
|
jaroslav@68
|
5700 |
* <p>
|
jaroslav@68
|
5701 |
* A character may be part of a Java identifier if and only if any
|
jaroslav@68
|
5702 |
* of the following are true:
|
jaroslav@68
|
5703 |
* <ul>
|
jaroslav@68
|
5704 |
* <li> it is a letter
|
jaroslav@68
|
5705 |
* <li> it is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5706 |
* <li> it is a connecting punctuation character (such as {@code '_'})
|
jaroslav@68
|
5707 |
* <li> it is a digit
|
jaroslav@68
|
5708 |
* <li> it is a numeric letter (such as a Roman numeral character)
|
jaroslav@68
|
5709 |
* <li> it is a combining mark
|
jaroslav@68
|
5710 |
* <li> it is a non-spacing mark
|
jaroslav@68
|
5711 |
* <li> {@code isIdentifierIgnorable} returns
|
jaroslav@68
|
5712 |
* {@code true} for the character.
|
jaroslav@68
|
5713 |
* </ul>
|
jaroslav@68
|
5714 |
*
|
jaroslav@68
|
5715 |
* @param ch the character to be tested.
|
jaroslav@68
|
5716 |
* @return {@code true} if the character may be part of a
|
jaroslav@68
|
5717 |
* Java identifier; {@code false} otherwise.
|
jaroslav@68
|
5718 |
* @see Character#isJavaLetter(char)
|
jaroslav@68
|
5719 |
* @see Character#isJavaIdentifierStart(char)
|
jaroslav@68
|
5720 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
5721 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5722 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5723 |
* @see Character#isUnicodeIdentifierPart(char)
|
jaroslav@68
|
5724 |
* @see Character#isIdentifierIgnorable(char)
|
jaroslav@68
|
5725 |
* @since 1.02
|
jaroslav@68
|
5726 |
* @deprecated Replaced by isJavaIdentifierPart(char).
|
jaroslav@68
|
5727 |
*/
|
jaroslav@68
|
5728 |
@Deprecated
|
jaroslav@68
|
5729 |
public static boolean isJavaLetterOrDigit(char ch) {
|
jaroslav@68
|
5730 |
return isJavaIdentifierPart(ch);
|
jaroslav@68
|
5731 |
}
|
jaroslav@68
|
5732 |
|
jaroslav@68
|
5733 |
/**
|
jaroslav@68
|
5734 |
* Determines if the specified character (Unicode code point) is an alphabet.
|
jaroslav@68
|
5735 |
* <p>
|
jaroslav@68
|
5736 |
* A character is considered to be alphabetic if its general category type,
|
jaroslav@68
|
5737 |
* provided by {@link Character#getType(int) getType(codePoint)}, is any of
|
jaroslav@68
|
5738 |
* the following:
|
jaroslav@68
|
5739 |
* <ul>
|
jaroslav@68
|
5740 |
* <li> <code>UPPERCASE_LETTER</code>
|
jaroslav@68
|
5741 |
* <li> <code>LOWERCASE_LETTER</code>
|
jaroslav@68
|
5742 |
* <li> <code>TITLECASE_LETTER</code>
|
jaroslav@68
|
5743 |
* <li> <code>MODIFIER_LETTER</code>
|
jaroslav@68
|
5744 |
* <li> <code>OTHER_LETTER</code>
|
jaroslav@68
|
5745 |
* <li> <code>LETTER_NUMBER</code>
|
jaroslav@68
|
5746 |
* </ul>
|
jaroslav@68
|
5747 |
* or it has contributory property Other_Alphabetic as defined by the
|
jaroslav@68
|
5748 |
* Unicode Standard.
|
jaroslav@68
|
5749 |
*
|
jaroslav@68
|
5750 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5751 |
* @return <code>true</code> if the character is a Unicode alphabet
|
jaroslav@68
|
5752 |
* character, <code>false</code> otherwise.
|
jaroslav@68
|
5753 |
* @since 1.7
|
jaroslav@68
|
5754 |
*/
|
jaroslav@68
|
5755 |
public static boolean isAlphabetic(int codePoint) {
|
jaroslav@68
|
5756 |
return (((((1 << Character.UPPERCASE_LETTER) |
|
jaroslav@68
|
5757 |
(1 << Character.LOWERCASE_LETTER) |
|
jaroslav@68
|
5758 |
(1 << Character.TITLECASE_LETTER) |
|
jaroslav@68
|
5759 |
(1 << Character.MODIFIER_LETTER) |
|
jaroslav@68
|
5760 |
(1 << Character.OTHER_LETTER) |
|
jaroslav@68
|
5761 |
(1 << Character.LETTER_NUMBER)) >> getType(codePoint)) & 1) != 0) ||
|
jaroslav@68
|
5762 |
CharacterData.of(codePoint).isOtherAlphabetic(codePoint);
|
jaroslav@68
|
5763 |
}
|
jaroslav@68
|
5764 |
|
jaroslav@68
|
5765 |
/**
|
jaroslav@68
|
5766 |
* Determines if the specified character (Unicode code point) is a CJKV
|
jaroslav@68
|
5767 |
* (Chinese, Japanese, Korean and Vietnamese) ideograph, as defined by
|
jaroslav@68
|
5768 |
* the Unicode Standard.
|
jaroslav@68
|
5769 |
*
|
jaroslav@68
|
5770 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5771 |
* @return <code>true</code> if the character is a Unicode ideograph
|
jaroslav@68
|
5772 |
* character, <code>false</code> otherwise.
|
jaroslav@68
|
5773 |
* @since 1.7
|
jaroslav@68
|
5774 |
*/
|
jaroslav@68
|
5775 |
public static boolean isIdeographic(int codePoint) {
|
jaroslav@68
|
5776 |
return CharacterData.of(codePoint).isIdeographic(codePoint);
|
jaroslav@68
|
5777 |
}
|
jaroslav@68
|
5778 |
|
jaroslav@68
|
5779 |
/**
|
jaroslav@68
|
5780 |
* Determines if the specified character is
|
jaroslav@68
|
5781 |
* permissible as the first character in a Java identifier.
|
jaroslav@68
|
5782 |
* <p>
|
jaroslav@68
|
5783 |
* A character may start a Java identifier if and only if
|
jaroslav@68
|
5784 |
* one of the following conditions is true:
|
jaroslav@68
|
5785 |
* <ul>
|
jaroslav@68
|
5786 |
* <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
|
jaroslav@68
|
5787 |
* <li> {@link #getType(char) getType(ch)} returns {@code LETTER_NUMBER}
|
jaroslav@68
|
5788 |
* <li> {@code ch} is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5789 |
* <li> {@code ch} is a connecting punctuation character (such as {@code '_'}).
|
jaroslav@68
|
5790 |
* </ul>
|
jaroslav@68
|
5791 |
*
|
jaroslav@68
|
5792 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5793 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5794 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5795 |
* the {@link #isJavaIdentifierStart(int)} method.
|
jaroslav@68
|
5796 |
*
|
jaroslav@68
|
5797 |
* @param ch the character to be tested.
|
jaroslav@68
|
5798 |
* @return {@code true} if the character may start a Java identifier;
|
jaroslav@68
|
5799 |
* {@code false} otherwise.
|
jaroslav@68
|
5800 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
5801 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5802 |
* @see Character#isUnicodeIdentifierStart(char)
|
jaroslav@68
|
5803 |
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
|
jaroslav@68
|
5804 |
* @since 1.1
|
jaroslav@68
|
5805 |
*/
|
jaroslav@68
|
5806 |
public static boolean isJavaIdentifierStart(char ch) {
|
jaroslav@68
|
5807 |
return isJavaIdentifierStart((int)ch);
|
jaroslav@68
|
5808 |
}
|
jaroslav@68
|
5809 |
|
jaroslav@68
|
5810 |
/**
|
jaroslav@68
|
5811 |
* Determines if the character (Unicode code point) is
|
jaroslav@68
|
5812 |
* permissible as the first character in a Java identifier.
|
jaroslav@68
|
5813 |
* <p>
|
jaroslav@68
|
5814 |
* A character may start a Java identifier if and only if
|
jaroslav@68
|
5815 |
* one of the following conditions is true:
|
jaroslav@68
|
5816 |
* <ul>
|
jaroslav@68
|
5817 |
* <li> {@link #isLetter(int) isLetter(codePoint)}
|
jaroslav@68
|
5818 |
* returns {@code true}
|
jaroslav@68
|
5819 |
* <li> {@link #getType(int) getType(codePoint)}
|
jaroslav@68
|
5820 |
* returns {@code LETTER_NUMBER}
|
jaroslav@68
|
5821 |
* <li> the referenced character is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5822 |
* <li> the referenced character is a connecting punctuation character
|
jaroslav@68
|
5823 |
* (such as {@code '_'}).
|
jaroslav@68
|
5824 |
* </ul>
|
jaroslav@68
|
5825 |
*
|
jaroslav@68
|
5826 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5827 |
* @return {@code true} if the character may start a Java identifier;
|
jaroslav@68
|
5828 |
* {@code false} otherwise.
|
jaroslav@68
|
5829 |
* @see Character#isJavaIdentifierPart(int)
|
jaroslav@68
|
5830 |
* @see Character#isLetter(int)
|
jaroslav@68
|
5831 |
* @see Character#isUnicodeIdentifierStart(int)
|
jaroslav@68
|
5832 |
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
|
jaroslav@68
|
5833 |
* @since 1.5
|
jaroslav@68
|
5834 |
*/
|
jaroslav@68
|
5835 |
public static boolean isJavaIdentifierStart(int codePoint) {
|
jaroslav@68
|
5836 |
return CharacterData.of(codePoint).isJavaIdentifierStart(codePoint);
|
jaroslav@68
|
5837 |
}
|
jaroslav@68
|
5838 |
|
jaroslav@68
|
5839 |
/**
|
jaroslav@68
|
5840 |
* Determines if the specified character may be part of a Java
|
jaroslav@68
|
5841 |
* identifier as other than the first character.
|
jaroslav@68
|
5842 |
* <p>
|
jaroslav@68
|
5843 |
* A character may be part of a Java identifier if any of the following
|
jaroslav@68
|
5844 |
* are true:
|
jaroslav@68
|
5845 |
* <ul>
|
jaroslav@68
|
5846 |
* <li> it is a letter
|
jaroslav@68
|
5847 |
* <li> it is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5848 |
* <li> it is a connecting punctuation character (such as {@code '_'})
|
jaroslav@68
|
5849 |
* <li> it is a digit
|
jaroslav@68
|
5850 |
* <li> it is a numeric letter (such as a Roman numeral character)
|
jaroslav@68
|
5851 |
* <li> it is a combining mark
|
jaroslav@68
|
5852 |
* <li> it is a non-spacing mark
|
jaroslav@68
|
5853 |
* <li> {@code isIdentifierIgnorable} returns
|
jaroslav@68
|
5854 |
* {@code true} for the character
|
jaroslav@68
|
5855 |
* </ul>
|
jaroslav@68
|
5856 |
*
|
jaroslav@68
|
5857 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5858 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5859 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5860 |
* the {@link #isJavaIdentifierPart(int)} method.
|
jaroslav@68
|
5861 |
*
|
jaroslav@68
|
5862 |
* @param ch the character to be tested.
|
jaroslav@68
|
5863 |
* @return {@code true} if the character may be part of a
|
jaroslav@68
|
5864 |
* Java identifier; {@code false} otherwise.
|
jaroslav@68
|
5865 |
* @see Character#isIdentifierIgnorable(char)
|
jaroslav@68
|
5866 |
* @see Character#isJavaIdentifierStart(char)
|
jaroslav@68
|
5867 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5868 |
* @see Character#isUnicodeIdentifierPart(char)
|
jaroslav@68
|
5869 |
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
|
jaroslav@68
|
5870 |
* @since 1.1
|
jaroslav@68
|
5871 |
*/
|
jaroslav@68
|
5872 |
public static boolean isJavaIdentifierPart(char ch) {
|
jaroslav@68
|
5873 |
return isJavaIdentifierPart((int)ch);
|
jaroslav@68
|
5874 |
}
|
jaroslav@68
|
5875 |
|
jaroslav@68
|
5876 |
/**
|
jaroslav@68
|
5877 |
* Determines if the character (Unicode code point) may be part of a Java
|
jaroslav@68
|
5878 |
* identifier as other than the first character.
|
jaroslav@68
|
5879 |
* <p>
|
jaroslav@68
|
5880 |
* A character may be part of a Java identifier if any of the following
|
jaroslav@68
|
5881 |
* are true:
|
jaroslav@68
|
5882 |
* <ul>
|
jaroslav@68
|
5883 |
* <li> it is a letter
|
jaroslav@68
|
5884 |
* <li> it is a currency symbol (such as {@code '$'})
|
jaroslav@68
|
5885 |
* <li> it is a connecting punctuation character (such as {@code '_'})
|
jaroslav@68
|
5886 |
* <li> it is a digit
|
jaroslav@68
|
5887 |
* <li> it is a numeric letter (such as a Roman numeral character)
|
jaroslav@68
|
5888 |
* <li> it is a combining mark
|
jaroslav@68
|
5889 |
* <li> it is a non-spacing mark
|
jaroslav@68
|
5890 |
* <li> {@link #isIdentifierIgnorable(int)
|
jaroslav@68
|
5891 |
* isIdentifierIgnorable(codePoint)} returns {@code true} for
|
jaroslav@68
|
5892 |
* the character
|
jaroslav@68
|
5893 |
* </ul>
|
jaroslav@68
|
5894 |
*
|
jaroslav@68
|
5895 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5896 |
* @return {@code true} if the character may be part of a
|
jaroslav@68
|
5897 |
* Java identifier; {@code false} otherwise.
|
jaroslav@68
|
5898 |
* @see Character#isIdentifierIgnorable(int)
|
jaroslav@68
|
5899 |
* @see Character#isJavaIdentifierStart(int)
|
jaroslav@68
|
5900 |
* @see Character#isLetterOrDigit(int)
|
jaroslav@68
|
5901 |
* @see Character#isUnicodeIdentifierPart(int)
|
jaroslav@68
|
5902 |
* @see javax.lang.model.SourceVersion#isIdentifier(CharSequence)
|
jaroslav@68
|
5903 |
* @since 1.5
|
jaroslav@68
|
5904 |
*/
|
jaroslav@68
|
5905 |
public static boolean isJavaIdentifierPart(int codePoint) {
|
jaroslav@68
|
5906 |
return CharacterData.of(codePoint).isJavaIdentifierPart(codePoint);
|
jaroslav@68
|
5907 |
}
|
jaroslav@68
|
5908 |
|
jaroslav@68
|
5909 |
/**
|
jaroslav@68
|
5910 |
* Determines if the specified character is permissible as the
|
jaroslav@68
|
5911 |
* first character in a Unicode identifier.
|
jaroslav@68
|
5912 |
* <p>
|
jaroslav@68
|
5913 |
* A character may start a Unicode identifier if and only if
|
jaroslav@68
|
5914 |
* one of the following conditions is true:
|
jaroslav@68
|
5915 |
* <ul>
|
jaroslav@68
|
5916 |
* <li> {@link #isLetter(char) isLetter(ch)} returns {@code true}
|
jaroslav@68
|
5917 |
* <li> {@link #getType(char) getType(ch)} returns
|
jaroslav@68
|
5918 |
* {@code LETTER_NUMBER}.
|
jaroslav@68
|
5919 |
* </ul>
|
jaroslav@68
|
5920 |
*
|
jaroslav@68
|
5921 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5922 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5923 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5924 |
* the {@link #isUnicodeIdentifierStart(int)} method.
|
jaroslav@68
|
5925 |
*
|
jaroslav@68
|
5926 |
* @param ch the character to be tested.
|
jaroslav@68
|
5927 |
* @return {@code true} if the character may start a Unicode
|
jaroslav@68
|
5928 |
* identifier; {@code false} otherwise.
|
jaroslav@68
|
5929 |
* @see Character#isJavaIdentifierStart(char)
|
jaroslav@68
|
5930 |
* @see Character#isLetter(char)
|
jaroslav@68
|
5931 |
* @see Character#isUnicodeIdentifierPart(char)
|
jaroslav@68
|
5932 |
* @since 1.1
|
jaroslav@68
|
5933 |
*/
|
jaroslav@68
|
5934 |
public static boolean isUnicodeIdentifierStart(char ch) {
|
jaroslav@68
|
5935 |
return isUnicodeIdentifierStart((int)ch);
|
jaroslav@68
|
5936 |
}
|
jaroslav@68
|
5937 |
|
jaroslav@68
|
5938 |
/**
|
jaroslav@68
|
5939 |
* Determines if the specified character (Unicode code point) is permissible as the
|
jaroslav@68
|
5940 |
* first character in a Unicode identifier.
|
jaroslav@68
|
5941 |
* <p>
|
jaroslav@68
|
5942 |
* A character may start a Unicode identifier if and only if
|
jaroslav@68
|
5943 |
* one of the following conditions is true:
|
jaroslav@68
|
5944 |
* <ul>
|
jaroslav@68
|
5945 |
* <li> {@link #isLetter(int) isLetter(codePoint)}
|
jaroslav@68
|
5946 |
* returns {@code true}
|
jaroslav@68
|
5947 |
* <li> {@link #getType(int) getType(codePoint)}
|
jaroslav@68
|
5948 |
* returns {@code LETTER_NUMBER}.
|
jaroslav@68
|
5949 |
* </ul>
|
jaroslav@68
|
5950 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
5951 |
* @return {@code true} if the character may start a Unicode
|
jaroslav@68
|
5952 |
* identifier; {@code false} otherwise.
|
jaroslav@68
|
5953 |
* @see Character#isJavaIdentifierStart(int)
|
jaroslav@68
|
5954 |
* @see Character#isLetter(int)
|
jaroslav@68
|
5955 |
* @see Character#isUnicodeIdentifierPart(int)
|
jaroslav@68
|
5956 |
* @since 1.5
|
jaroslav@68
|
5957 |
*/
|
jaroslav@68
|
5958 |
public static boolean isUnicodeIdentifierStart(int codePoint) {
|
jaroslav@68
|
5959 |
return CharacterData.of(codePoint).isUnicodeIdentifierStart(codePoint);
|
jaroslav@68
|
5960 |
}
|
jaroslav@68
|
5961 |
|
jaroslav@68
|
5962 |
/**
|
jaroslav@68
|
5963 |
* Determines if the specified character may be part of a Unicode
|
jaroslav@68
|
5964 |
* identifier as other than the first character.
|
jaroslav@68
|
5965 |
* <p>
|
jaroslav@68
|
5966 |
* A character may be part of a Unicode identifier if and only if
|
jaroslav@68
|
5967 |
* one of the following statements is true:
|
jaroslav@68
|
5968 |
* <ul>
|
jaroslav@68
|
5969 |
* <li> it is a letter
|
jaroslav@68
|
5970 |
* <li> it is a connecting punctuation character (such as {@code '_'})
|
jaroslav@68
|
5971 |
* <li> it is a digit
|
jaroslav@68
|
5972 |
* <li> it is a numeric letter (such as a Roman numeral character)
|
jaroslav@68
|
5973 |
* <li> it is a combining mark
|
jaroslav@68
|
5974 |
* <li> it is a non-spacing mark
|
jaroslav@68
|
5975 |
* <li> {@code isIdentifierIgnorable} returns
|
jaroslav@68
|
5976 |
* {@code true} for this character.
|
jaroslav@68
|
5977 |
* </ul>
|
jaroslav@68
|
5978 |
*
|
jaroslav@68
|
5979 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
5980 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
5981 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
5982 |
* the {@link #isUnicodeIdentifierPart(int)} method.
|
jaroslav@68
|
5983 |
*
|
jaroslav@68
|
5984 |
* @param ch the character to be tested.
|
jaroslav@68
|
5985 |
* @return {@code true} if the character may be part of a
|
jaroslav@68
|
5986 |
* Unicode identifier; {@code false} otherwise.
|
jaroslav@68
|
5987 |
* @see Character#isIdentifierIgnorable(char)
|
jaroslav@68
|
5988 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
5989 |
* @see Character#isLetterOrDigit(char)
|
jaroslav@68
|
5990 |
* @see Character#isUnicodeIdentifierStart(char)
|
jaroslav@68
|
5991 |
* @since 1.1
|
jaroslav@68
|
5992 |
*/
|
jaroslav@68
|
5993 |
public static boolean isUnicodeIdentifierPart(char ch) {
|
jaroslav@68
|
5994 |
return isUnicodeIdentifierPart((int)ch);
|
jaroslav@68
|
5995 |
}
|
jaroslav@68
|
5996 |
|
jaroslav@68
|
5997 |
/**
|
jaroslav@68
|
5998 |
* Determines if the specified character (Unicode code point) may be part of a Unicode
|
jaroslav@68
|
5999 |
* identifier as other than the first character.
|
jaroslav@68
|
6000 |
* <p>
|
jaroslav@68
|
6001 |
* A character may be part of a Unicode identifier if and only if
|
jaroslav@68
|
6002 |
* one of the following statements is true:
|
jaroslav@68
|
6003 |
* <ul>
|
jaroslav@68
|
6004 |
* <li> it is a letter
|
jaroslav@68
|
6005 |
* <li> it is a connecting punctuation character (such as {@code '_'})
|
jaroslav@68
|
6006 |
* <li> it is a digit
|
jaroslav@68
|
6007 |
* <li> it is a numeric letter (such as a Roman numeral character)
|
jaroslav@68
|
6008 |
* <li> it is a combining mark
|
jaroslav@68
|
6009 |
* <li> it is a non-spacing mark
|
jaroslav@68
|
6010 |
* <li> {@code isIdentifierIgnorable} returns
|
jaroslav@68
|
6011 |
* {@code true} for this character.
|
jaroslav@68
|
6012 |
* </ul>
|
jaroslav@68
|
6013 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6014 |
* @return {@code true} if the character may be part of a
|
jaroslav@68
|
6015 |
* Unicode identifier; {@code false} otherwise.
|
jaroslav@68
|
6016 |
* @see Character#isIdentifierIgnorable(int)
|
jaroslav@68
|
6017 |
* @see Character#isJavaIdentifierPart(int)
|
jaroslav@68
|
6018 |
* @see Character#isLetterOrDigit(int)
|
jaroslav@68
|
6019 |
* @see Character#isUnicodeIdentifierStart(int)
|
jaroslav@68
|
6020 |
* @since 1.5
|
jaroslav@68
|
6021 |
*/
|
jaroslav@68
|
6022 |
public static boolean isUnicodeIdentifierPart(int codePoint) {
|
jaroslav@68
|
6023 |
return CharacterData.of(codePoint).isUnicodeIdentifierPart(codePoint);
|
jaroslav@68
|
6024 |
}
|
jaroslav@68
|
6025 |
|
jaroslav@68
|
6026 |
/**
|
jaroslav@68
|
6027 |
* Determines if the specified character should be regarded as
|
jaroslav@68
|
6028 |
* an ignorable character in a Java identifier or a Unicode identifier.
|
jaroslav@68
|
6029 |
* <p>
|
jaroslav@68
|
6030 |
* The following Unicode characters are ignorable in a Java identifier
|
jaroslav@68
|
6031 |
* or a Unicode identifier:
|
jaroslav@68
|
6032 |
* <ul>
|
jaroslav@68
|
6033 |
* <li>ISO control characters that are not whitespace
|
jaroslav@68
|
6034 |
* <ul>
|
jaroslav@68
|
6035 |
* <li>{@code '\u005Cu0000'} through {@code '\u005Cu0008'}
|
jaroslav@68
|
6036 |
* <li>{@code '\u005Cu000E'} through {@code '\u005Cu001B'}
|
jaroslav@68
|
6037 |
* <li>{@code '\u005Cu007F'} through {@code '\u005Cu009F'}
|
jaroslav@68
|
6038 |
* </ul>
|
jaroslav@68
|
6039 |
*
|
jaroslav@68
|
6040 |
* <li>all characters that have the {@code FORMAT} general
|
jaroslav@68
|
6041 |
* category value
|
jaroslav@68
|
6042 |
* </ul>
|
jaroslav@68
|
6043 |
*
|
jaroslav@68
|
6044 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6045 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6046 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6047 |
* the {@link #isIdentifierIgnorable(int)} method.
|
jaroslav@68
|
6048 |
*
|
jaroslav@68
|
6049 |
* @param ch the character to be tested.
|
jaroslav@68
|
6050 |
* @return {@code true} if the character is an ignorable control
|
jaroslav@68
|
6051 |
* character that may be part of a Java or Unicode identifier;
|
jaroslav@68
|
6052 |
* {@code false} otherwise.
|
jaroslav@68
|
6053 |
* @see Character#isJavaIdentifierPart(char)
|
jaroslav@68
|
6054 |
* @see Character#isUnicodeIdentifierPart(char)
|
jaroslav@68
|
6055 |
* @since 1.1
|
jaroslav@68
|
6056 |
*/
|
jaroslav@68
|
6057 |
public static boolean isIdentifierIgnorable(char ch) {
|
jaroslav@68
|
6058 |
return isIdentifierIgnorable((int)ch);
|
jaroslav@68
|
6059 |
}
|
jaroslav@68
|
6060 |
|
jaroslav@68
|
6061 |
/**
|
jaroslav@68
|
6062 |
* Determines if the specified character (Unicode code point) should be regarded as
|
jaroslav@68
|
6063 |
* an ignorable character in a Java identifier or a Unicode identifier.
|
jaroslav@68
|
6064 |
* <p>
|
jaroslav@68
|
6065 |
* The following Unicode characters are ignorable in a Java identifier
|
jaroslav@68
|
6066 |
* or a Unicode identifier:
|
jaroslav@68
|
6067 |
* <ul>
|
jaroslav@68
|
6068 |
* <li>ISO control characters that are not whitespace
|
jaroslav@68
|
6069 |
* <ul>
|
jaroslav@68
|
6070 |
* <li>{@code '\u005Cu0000'} through {@code '\u005Cu0008'}
|
jaroslav@68
|
6071 |
* <li>{@code '\u005Cu000E'} through {@code '\u005Cu001B'}
|
jaroslav@68
|
6072 |
* <li>{@code '\u005Cu007F'} through {@code '\u005Cu009F'}
|
jaroslav@68
|
6073 |
* </ul>
|
jaroslav@68
|
6074 |
*
|
jaroslav@68
|
6075 |
* <li>all characters that have the {@code FORMAT} general
|
jaroslav@68
|
6076 |
* category value
|
jaroslav@68
|
6077 |
* </ul>
|
jaroslav@68
|
6078 |
*
|
jaroslav@68
|
6079 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6080 |
* @return {@code true} if the character is an ignorable control
|
jaroslav@68
|
6081 |
* character that may be part of a Java or Unicode identifier;
|
jaroslav@68
|
6082 |
* {@code false} otherwise.
|
jaroslav@68
|
6083 |
* @see Character#isJavaIdentifierPart(int)
|
jaroslav@68
|
6084 |
* @see Character#isUnicodeIdentifierPart(int)
|
jaroslav@68
|
6085 |
* @since 1.5
|
jaroslav@68
|
6086 |
*/
|
jaroslav@68
|
6087 |
public static boolean isIdentifierIgnorable(int codePoint) {
|
jaroslav@68
|
6088 |
return CharacterData.of(codePoint).isIdentifierIgnorable(codePoint);
|
jaroslav@68
|
6089 |
}
|
jaroslav@68
|
6090 |
|
jaroslav@68
|
6091 |
/**
|
jaroslav@68
|
6092 |
* Converts the character argument to lowercase using case
|
jaroslav@68
|
6093 |
* mapping information from the UnicodeData file.
|
jaroslav@68
|
6094 |
* <p>
|
jaroslav@68
|
6095 |
* Note that
|
jaroslav@68
|
6096 |
* {@code Character.isLowerCase(Character.toLowerCase(ch))}
|
jaroslav@68
|
6097 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6098 |
* characters, particularly those that are symbols or ideographs.
|
jaroslav@68
|
6099 |
*
|
jaroslav@68
|
6100 |
* <p>In general, {@link String#toLowerCase()} should be used to map
|
jaroslav@68
|
6101 |
* characters to lowercase. {@code String} case mapping methods
|
jaroslav@68
|
6102 |
* have several benefits over {@code Character} case mapping methods.
|
jaroslav@68
|
6103 |
* {@code String} case mapping methods can perform locale-sensitive
|
jaroslav@68
|
6104 |
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
|
jaroslav@68
|
6105 |
* the {@code Character} case mapping methods cannot.
|
jaroslav@68
|
6106 |
*
|
jaroslav@68
|
6107 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6108 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6109 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6110 |
* the {@link #toLowerCase(int)} method.
|
jaroslav@68
|
6111 |
*
|
jaroslav@68
|
6112 |
* @param ch the character to be converted.
|
jaroslav@68
|
6113 |
* @return the lowercase equivalent of the character, if any;
|
jaroslav@68
|
6114 |
* otherwise, the character itself.
|
jaroslav@68
|
6115 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
6116 |
* @see String#toLowerCase()
|
jaroslav@68
|
6117 |
*/
|
jaroslav@68
|
6118 |
public static char toLowerCase(char ch) {
|
jaroslav@68
|
6119 |
return (char)toLowerCase((int)ch);
|
jaroslav@68
|
6120 |
}
|
jaroslav@68
|
6121 |
|
jaroslav@68
|
6122 |
/**
|
jaroslav@68
|
6123 |
* Converts the character (Unicode code point) argument to
|
jaroslav@68
|
6124 |
* lowercase using case mapping information from the UnicodeData
|
jaroslav@68
|
6125 |
* file.
|
jaroslav@68
|
6126 |
*
|
jaroslav@68
|
6127 |
* <p> Note that
|
jaroslav@68
|
6128 |
* {@code Character.isLowerCase(Character.toLowerCase(codePoint))}
|
jaroslav@68
|
6129 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6130 |
* characters, particularly those that are symbols or ideographs.
|
jaroslav@68
|
6131 |
*
|
jaroslav@68
|
6132 |
* <p>In general, {@link String#toLowerCase()} should be used to map
|
jaroslav@68
|
6133 |
* characters to lowercase. {@code String} case mapping methods
|
jaroslav@68
|
6134 |
* have several benefits over {@code Character} case mapping methods.
|
jaroslav@68
|
6135 |
* {@code String} case mapping methods can perform locale-sensitive
|
jaroslav@68
|
6136 |
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
|
jaroslav@68
|
6137 |
* the {@code Character} case mapping methods cannot.
|
jaroslav@68
|
6138 |
*
|
jaroslav@68
|
6139 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6140 |
* @return the lowercase equivalent of the character (Unicode code
|
jaroslav@68
|
6141 |
* point), if any; otherwise, the character itself.
|
jaroslav@68
|
6142 |
* @see Character#isLowerCase(int)
|
jaroslav@68
|
6143 |
* @see String#toLowerCase()
|
jaroslav@68
|
6144 |
*
|
jaroslav@68
|
6145 |
* @since 1.5
|
jaroslav@68
|
6146 |
*/
|
jaroslav@68
|
6147 |
public static int toLowerCase(int codePoint) {
|
jaroslav@68
|
6148 |
return CharacterData.of(codePoint).toLowerCase(codePoint);
|
jaroslav@68
|
6149 |
}
|
jaroslav@68
|
6150 |
|
jaroslav@68
|
6151 |
/**
|
jaroslav@68
|
6152 |
* Converts the character argument to uppercase using case mapping
|
jaroslav@68
|
6153 |
* information from the UnicodeData file.
|
jaroslav@68
|
6154 |
* <p>
|
jaroslav@68
|
6155 |
* Note that
|
jaroslav@68
|
6156 |
* {@code Character.isUpperCase(Character.toUpperCase(ch))}
|
jaroslav@68
|
6157 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6158 |
* characters, particularly those that are symbols or ideographs.
|
jaroslav@68
|
6159 |
*
|
jaroslav@68
|
6160 |
* <p>In general, {@link String#toUpperCase()} should be used to map
|
jaroslav@68
|
6161 |
* characters to uppercase. {@code String} case mapping methods
|
jaroslav@68
|
6162 |
* have several benefits over {@code Character} case mapping methods.
|
jaroslav@68
|
6163 |
* {@code String} case mapping methods can perform locale-sensitive
|
jaroslav@68
|
6164 |
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
|
jaroslav@68
|
6165 |
* the {@code Character} case mapping methods cannot.
|
jaroslav@68
|
6166 |
*
|
jaroslav@68
|
6167 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6168 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6169 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6170 |
* the {@link #toUpperCase(int)} method.
|
jaroslav@68
|
6171 |
*
|
jaroslav@68
|
6172 |
* @param ch the character to be converted.
|
jaroslav@68
|
6173 |
* @return the uppercase equivalent of the character, if any;
|
jaroslav@68
|
6174 |
* otherwise, the character itself.
|
jaroslav@68
|
6175 |
* @see Character#isUpperCase(char)
|
jaroslav@68
|
6176 |
* @see String#toUpperCase()
|
jaroslav@68
|
6177 |
*/
|
jaroslav@68
|
6178 |
public static char toUpperCase(char ch) {
|
jaroslav@68
|
6179 |
return (char)toUpperCase((int)ch);
|
jaroslav@68
|
6180 |
}
|
jaroslav@68
|
6181 |
|
jaroslav@68
|
6182 |
/**
|
jaroslav@68
|
6183 |
* Converts the character (Unicode code point) argument to
|
jaroslav@68
|
6184 |
* uppercase using case mapping information from the UnicodeData
|
jaroslav@68
|
6185 |
* file.
|
jaroslav@68
|
6186 |
*
|
jaroslav@68
|
6187 |
* <p>Note that
|
jaroslav@68
|
6188 |
* {@code Character.isUpperCase(Character.toUpperCase(codePoint))}
|
jaroslav@68
|
6189 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6190 |
* characters, particularly those that are symbols or ideographs.
|
jaroslav@68
|
6191 |
*
|
jaroslav@68
|
6192 |
* <p>In general, {@link String#toUpperCase()} should be used to map
|
jaroslav@68
|
6193 |
* characters to uppercase. {@code String} case mapping methods
|
jaroslav@68
|
6194 |
* have several benefits over {@code Character} case mapping methods.
|
jaroslav@68
|
6195 |
* {@code String} case mapping methods can perform locale-sensitive
|
jaroslav@68
|
6196 |
* mappings, context-sensitive mappings, and 1:M character mappings, whereas
|
jaroslav@68
|
6197 |
* the {@code Character} case mapping methods cannot.
|
jaroslav@68
|
6198 |
*
|
jaroslav@68
|
6199 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6200 |
* @return the uppercase equivalent of the character, if any;
|
jaroslav@68
|
6201 |
* otherwise, the character itself.
|
jaroslav@68
|
6202 |
* @see Character#isUpperCase(int)
|
jaroslav@68
|
6203 |
* @see String#toUpperCase()
|
jaroslav@68
|
6204 |
*
|
jaroslav@68
|
6205 |
* @since 1.5
|
jaroslav@68
|
6206 |
*/
|
jaroslav@68
|
6207 |
public static int toUpperCase(int codePoint) {
|
jaroslav@68
|
6208 |
return CharacterData.of(codePoint).toUpperCase(codePoint);
|
jaroslav@68
|
6209 |
}
|
jaroslav@68
|
6210 |
|
jaroslav@68
|
6211 |
/**
|
jaroslav@68
|
6212 |
* Converts the character argument to titlecase using case mapping
|
jaroslav@68
|
6213 |
* information from the UnicodeData file. If a character has no
|
jaroslav@68
|
6214 |
* explicit titlecase mapping and is not itself a titlecase char
|
jaroslav@68
|
6215 |
* according to UnicodeData, then the uppercase mapping is
|
jaroslav@68
|
6216 |
* returned as an equivalent titlecase mapping. If the
|
jaroslav@68
|
6217 |
* {@code char} argument is already a titlecase
|
jaroslav@68
|
6218 |
* {@code char}, the same {@code char} value will be
|
jaroslav@68
|
6219 |
* returned.
|
jaroslav@68
|
6220 |
* <p>
|
jaroslav@68
|
6221 |
* Note that
|
jaroslav@68
|
6222 |
* {@code Character.isTitleCase(Character.toTitleCase(ch))}
|
jaroslav@68
|
6223 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6224 |
* characters.
|
jaroslav@68
|
6225 |
*
|
jaroslav@68
|
6226 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6227 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6228 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6229 |
* the {@link #toTitleCase(int)} method.
|
jaroslav@68
|
6230 |
*
|
jaroslav@68
|
6231 |
* @param ch the character to be converted.
|
jaroslav@68
|
6232 |
* @return the titlecase equivalent of the character, if any;
|
jaroslav@68
|
6233 |
* otherwise, the character itself.
|
jaroslav@68
|
6234 |
* @see Character#isTitleCase(char)
|
jaroslav@68
|
6235 |
* @see Character#toLowerCase(char)
|
jaroslav@68
|
6236 |
* @see Character#toUpperCase(char)
|
jaroslav@68
|
6237 |
* @since 1.0.2
|
jaroslav@68
|
6238 |
*/
|
jaroslav@68
|
6239 |
public static char toTitleCase(char ch) {
|
jaroslav@68
|
6240 |
return (char)toTitleCase((int)ch);
|
jaroslav@68
|
6241 |
}
|
jaroslav@68
|
6242 |
|
jaroslav@68
|
6243 |
/**
|
jaroslav@68
|
6244 |
* Converts the character (Unicode code point) argument to titlecase using case mapping
|
jaroslav@68
|
6245 |
* information from the UnicodeData file. If a character has no
|
jaroslav@68
|
6246 |
* explicit titlecase mapping and is not itself a titlecase char
|
jaroslav@68
|
6247 |
* according to UnicodeData, then the uppercase mapping is
|
jaroslav@68
|
6248 |
* returned as an equivalent titlecase mapping. If the
|
jaroslav@68
|
6249 |
* character argument is already a titlecase
|
jaroslav@68
|
6250 |
* character, the same character value will be
|
jaroslav@68
|
6251 |
* returned.
|
jaroslav@68
|
6252 |
*
|
jaroslav@68
|
6253 |
* <p>Note that
|
jaroslav@68
|
6254 |
* {@code Character.isTitleCase(Character.toTitleCase(codePoint))}
|
jaroslav@68
|
6255 |
* does not always return {@code true} for some ranges of
|
jaroslav@68
|
6256 |
* characters.
|
jaroslav@68
|
6257 |
*
|
jaroslav@68
|
6258 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6259 |
* @return the titlecase equivalent of the character, if any;
|
jaroslav@68
|
6260 |
* otherwise, the character itself.
|
jaroslav@68
|
6261 |
* @see Character#isTitleCase(int)
|
jaroslav@68
|
6262 |
* @see Character#toLowerCase(int)
|
jaroslav@68
|
6263 |
* @see Character#toUpperCase(int)
|
jaroslav@68
|
6264 |
* @since 1.5
|
jaroslav@68
|
6265 |
*/
|
jaroslav@68
|
6266 |
public static int toTitleCase(int codePoint) {
|
jaroslav@68
|
6267 |
return CharacterData.of(codePoint).toTitleCase(codePoint);
|
jaroslav@68
|
6268 |
}
|
jaroslav@68
|
6269 |
|
jaroslav@68
|
6270 |
/**
|
jaroslav@68
|
6271 |
* Returns the numeric value of the character {@code ch} in the
|
jaroslav@68
|
6272 |
* specified radix.
|
jaroslav@68
|
6273 |
* <p>
|
jaroslav@68
|
6274 |
* If the radix is not in the range {@code MIN_RADIX} ≤
|
jaroslav@68
|
6275 |
* {@code radix} ≤ {@code MAX_RADIX} or if the
|
jaroslav@68
|
6276 |
* value of {@code ch} is not a valid digit in the specified
|
jaroslav@68
|
6277 |
* radix, {@code -1} is returned. A character is a valid digit
|
jaroslav@68
|
6278 |
* if at least one of the following is true:
|
jaroslav@68
|
6279 |
* <ul>
|
jaroslav@68
|
6280 |
* <li>The method {@code isDigit} is {@code true} of the character
|
jaroslav@68
|
6281 |
* and the Unicode decimal digit value of the character (or its
|
jaroslav@68
|
6282 |
* single-character decomposition) is less than the specified radix.
|
jaroslav@68
|
6283 |
* In this case the decimal digit value is returned.
|
jaroslav@68
|
6284 |
* <li>The character is one of the uppercase Latin letters
|
jaroslav@68
|
6285 |
* {@code 'A'} through {@code 'Z'} and its code is less than
|
jaroslav@68
|
6286 |
* {@code radix + 'A' - 10}.
|
jaroslav@68
|
6287 |
* In this case, {@code ch - 'A' + 10}
|
jaroslav@68
|
6288 |
* is returned.
|
jaroslav@68
|
6289 |
* <li>The character is one of the lowercase Latin letters
|
jaroslav@68
|
6290 |
* {@code 'a'} through {@code 'z'} and its code is less than
|
jaroslav@68
|
6291 |
* {@code radix + 'a' - 10}.
|
jaroslav@68
|
6292 |
* In this case, {@code ch - 'a' + 10}
|
jaroslav@68
|
6293 |
* is returned.
|
jaroslav@68
|
6294 |
* <li>The character is one of the fullwidth uppercase Latin letters A
|
jaroslav@68
|
6295 |
* ({@code '\u005CuFF21'}) through Z ({@code '\u005CuFF3A'})
|
jaroslav@68
|
6296 |
* and its code is less than
|
jaroslav@68
|
6297 |
* {@code radix + '\u005CuFF21' - 10}.
|
jaroslav@68
|
6298 |
* In this case, {@code ch - '\u005CuFF21' + 10}
|
jaroslav@68
|
6299 |
* is returned.
|
jaroslav@68
|
6300 |
* <li>The character is one of the fullwidth lowercase Latin letters a
|
jaroslav@68
|
6301 |
* ({@code '\u005CuFF41'}) through z ({@code '\u005CuFF5A'})
|
jaroslav@68
|
6302 |
* and its code is less than
|
jaroslav@68
|
6303 |
* {@code radix + '\u005CuFF41' - 10}.
|
jaroslav@68
|
6304 |
* In this case, {@code ch - '\u005CuFF41' + 10}
|
jaroslav@68
|
6305 |
* is returned.
|
jaroslav@68
|
6306 |
* </ul>
|
jaroslav@68
|
6307 |
*
|
jaroslav@68
|
6308 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6309 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6310 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6311 |
* the {@link #digit(int, int)} method.
|
jaroslav@68
|
6312 |
*
|
jaroslav@68
|
6313 |
* @param ch the character to be converted.
|
jaroslav@68
|
6314 |
* @param radix the radix.
|
jaroslav@68
|
6315 |
* @return the numeric value represented by the character in the
|
jaroslav@68
|
6316 |
* specified radix.
|
jaroslav@68
|
6317 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
6318 |
* @see Character#isDigit(char)
|
jaroslav@68
|
6319 |
*/
|
jaroslav@68
|
6320 |
public static int digit(char ch, int radix) {
|
jaroslav@68
|
6321 |
return digit((int)ch, radix);
|
jaroslav@68
|
6322 |
}
|
jaroslav@68
|
6323 |
|
jaroslav@68
|
6324 |
/**
|
jaroslav@68
|
6325 |
* Returns the numeric value of the specified character (Unicode
|
jaroslav@68
|
6326 |
* code point) in the specified radix.
|
jaroslav@68
|
6327 |
*
|
jaroslav@68
|
6328 |
* <p>If the radix is not in the range {@code MIN_RADIX} ≤
|
jaroslav@68
|
6329 |
* {@code radix} ≤ {@code MAX_RADIX} or if the
|
jaroslav@68
|
6330 |
* character is not a valid digit in the specified
|
jaroslav@68
|
6331 |
* radix, {@code -1} is returned. A character is a valid digit
|
jaroslav@68
|
6332 |
* if at least one of the following is true:
|
jaroslav@68
|
6333 |
* <ul>
|
jaroslav@68
|
6334 |
* <li>The method {@link #isDigit(int) isDigit(codePoint)} is {@code true} of the character
|
jaroslav@68
|
6335 |
* and the Unicode decimal digit value of the character (or its
|
jaroslav@68
|
6336 |
* single-character decomposition) is less than the specified radix.
|
jaroslav@68
|
6337 |
* In this case the decimal digit value is returned.
|
jaroslav@68
|
6338 |
* <li>The character is one of the uppercase Latin letters
|
jaroslav@68
|
6339 |
* {@code 'A'} through {@code 'Z'} and its code is less than
|
jaroslav@68
|
6340 |
* {@code radix + 'A' - 10}.
|
jaroslav@68
|
6341 |
* In this case, {@code codePoint - 'A' + 10}
|
jaroslav@68
|
6342 |
* is returned.
|
jaroslav@68
|
6343 |
* <li>The character is one of the lowercase Latin letters
|
jaroslav@68
|
6344 |
* {@code 'a'} through {@code 'z'} and its code is less than
|
jaroslav@68
|
6345 |
* {@code radix + 'a' - 10}.
|
jaroslav@68
|
6346 |
* In this case, {@code codePoint - 'a' + 10}
|
jaroslav@68
|
6347 |
* is returned.
|
jaroslav@68
|
6348 |
* <li>The character is one of the fullwidth uppercase Latin letters A
|
jaroslav@68
|
6349 |
* ({@code '\u005CuFF21'}) through Z ({@code '\u005CuFF3A'})
|
jaroslav@68
|
6350 |
* and its code is less than
|
jaroslav@68
|
6351 |
* {@code radix + '\u005CuFF21' - 10}.
|
jaroslav@68
|
6352 |
* In this case,
|
jaroslav@68
|
6353 |
* {@code codePoint - '\u005CuFF21' + 10}
|
jaroslav@68
|
6354 |
* is returned.
|
jaroslav@68
|
6355 |
* <li>The character is one of the fullwidth lowercase Latin letters a
|
jaroslav@68
|
6356 |
* ({@code '\u005CuFF41'}) through z ({@code '\u005CuFF5A'})
|
jaroslav@68
|
6357 |
* and its code is less than
|
jaroslav@68
|
6358 |
* {@code radix + '\u005CuFF41'- 10}.
|
jaroslav@68
|
6359 |
* In this case,
|
jaroslav@68
|
6360 |
* {@code codePoint - '\u005CuFF41' + 10}
|
jaroslav@68
|
6361 |
* is returned.
|
jaroslav@68
|
6362 |
* </ul>
|
jaroslav@68
|
6363 |
*
|
jaroslav@68
|
6364 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6365 |
* @param radix the radix.
|
jaroslav@68
|
6366 |
* @return the numeric value represented by the character in the
|
jaroslav@68
|
6367 |
* specified radix.
|
jaroslav@68
|
6368 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
6369 |
* @see Character#isDigit(int)
|
jaroslav@68
|
6370 |
* @since 1.5
|
jaroslav@68
|
6371 |
*/
|
jaroslav@68
|
6372 |
public static int digit(int codePoint, int radix) {
|
jaroslav@68
|
6373 |
return CharacterData.of(codePoint).digit(codePoint, radix);
|
jaroslav@68
|
6374 |
}
|
jaroslav@68
|
6375 |
|
jaroslav@68
|
6376 |
/**
|
jaroslav@68
|
6377 |
* Returns the {@code int} value that the specified Unicode
|
jaroslav@68
|
6378 |
* character represents. For example, the character
|
jaroslav@68
|
6379 |
* {@code '\u005Cu216C'} (the roman numeral fifty) will return
|
jaroslav@68
|
6380 |
* an int with a value of 50.
|
jaroslav@68
|
6381 |
* <p>
|
jaroslav@68
|
6382 |
* The letters A-Z in their uppercase ({@code '\u005Cu0041'} through
|
jaroslav@68
|
6383 |
* {@code '\u005Cu005A'}), lowercase
|
jaroslav@68
|
6384 |
* ({@code '\u005Cu0061'} through {@code '\u005Cu007A'}), and
|
jaroslav@68
|
6385 |
* full width variant ({@code '\u005CuFF21'} through
|
jaroslav@68
|
6386 |
* {@code '\u005CuFF3A'} and {@code '\u005CuFF41'} through
|
jaroslav@68
|
6387 |
* {@code '\u005CuFF5A'}) forms have numeric values from 10
|
jaroslav@68
|
6388 |
* through 35. This is independent of the Unicode specification,
|
jaroslav@68
|
6389 |
* which does not assign numeric values to these {@code char}
|
jaroslav@68
|
6390 |
* values.
|
jaroslav@68
|
6391 |
* <p>
|
jaroslav@68
|
6392 |
* If the character does not have a numeric value, then -1 is returned.
|
jaroslav@68
|
6393 |
* If the character has a numeric value that cannot be represented as a
|
jaroslav@68
|
6394 |
* nonnegative integer (for example, a fractional value), then -2
|
jaroslav@68
|
6395 |
* is returned.
|
jaroslav@68
|
6396 |
*
|
jaroslav@68
|
6397 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6398 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6399 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6400 |
* the {@link #getNumericValue(int)} method.
|
jaroslav@68
|
6401 |
*
|
jaroslav@68
|
6402 |
* @param ch the character to be converted.
|
jaroslav@68
|
6403 |
* @return the numeric value of the character, as a nonnegative {@code int}
|
jaroslav@68
|
6404 |
* value; -2 if the character has a numeric value that is not a
|
jaroslav@68
|
6405 |
* nonnegative integer; -1 if the character has no numeric value.
|
jaroslav@68
|
6406 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
6407 |
* @see Character#isDigit(char)
|
jaroslav@68
|
6408 |
* @since 1.1
|
jaroslav@68
|
6409 |
*/
|
jaroslav@68
|
6410 |
public static int getNumericValue(char ch) {
|
jaroslav@68
|
6411 |
return getNumericValue((int)ch);
|
jaroslav@68
|
6412 |
}
|
jaroslav@68
|
6413 |
|
jaroslav@68
|
6414 |
/**
|
jaroslav@68
|
6415 |
* Returns the {@code int} value that the specified
|
jaroslav@68
|
6416 |
* character (Unicode code point) represents. For example, the character
|
jaroslav@68
|
6417 |
* {@code '\u005Cu216C'} (the Roman numeral fifty) will return
|
jaroslav@68
|
6418 |
* an {@code int} with a value of 50.
|
jaroslav@68
|
6419 |
* <p>
|
jaroslav@68
|
6420 |
* The letters A-Z in their uppercase ({@code '\u005Cu0041'} through
|
jaroslav@68
|
6421 |
* {@code '\u005Cu005A'}), lowercase
|
jaroslav@68
|
6422 |
* ({@code '\u005Cu0061'} through {@code '\u005Cu007A'}), and
|
jaroslav@68
|
6423 |
* full width variant ({@code '\u005CuFF21'} through
|
jaroslav@68
|
6424 |
* {@code '\u005CuFF3A'} and {@code '\u005CuFF41'} through
|
jaroslav@68
|
6425 |
* {@code '\u005CuFF5A'}) forms have numeric values from 10
|
jaroslav@68
|
6426 |
* through 35. This is independent of the Unicode specification,
|
jaroslav@68
|
6427 |
* which does not assign numeric values to these {@code char}
|
jaroslav@68
|
6428 |
* values.
|
jaroslav@68
|
6429 |
* <p>
|
jaroslav@68
|
6430 |
* If the character does not have a numeric value, then -1 is returned.
|
jaroslav@68
|
6431 |
* If the character has a numeric value that cannot be represented as a
|
jaroslav@68
|
6432 |
* nonnegative integer (for example, a fractional value), then -2
|
jaroslav@68
|
6433 |
* is returned.
|
jaroslav@68
|
6434 |
*
|
jaroslav@68
|
6435 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6436 |
* @return the numeric value of the character, as a nonnegative {@code int}
|
jaroslav@68
|
6437 |
* value; -2 if the character has a numeric value that is not a
|
jaroslav@68
|
6438 |
* nonnegative integer; -1 if the character has no numeric value.
|
jaroslav@68
|
6439 |
* @see Character#forDigit(int, int)
|
jaroslav@68
|
6440 |
* @see Character#isDigit(int)
|
jaroslav@68
|
6441 |
* @since 1.5
|
jaroslav@68
|
6442 |
*/
|
jaroslav@68
|
6443 |
public static int getNumericValue(int codePoint) {
|
jaroslav@68
|
6444 |
return CharacterData.of(codePoint).getNumericValue(codePoint);
|
jaroslav@68
|
6445 |
}
|
jaroslav@68
|
6446 |
|
jaroslav@68
|
6447 |
/**
|
jaroslav@68
|
6448 |
* Determines if the specified character is ISO-LATIN-1 white space.
|
jaroslav@68
|
6449 |
* This method returns {@code true} for the following five
|
jaroslav@68
|
6450 |
* characters only:
|
jaroslav@68
|
6451 |
* <table>
|
jaroslav@68
|
6452 |
* <tr><td>{@code '\t'}</td> <td>{@code U+0009}</td>
|
jaroslav@68
|
6453 |
* <td>{@code HORIZONTAL TABULATION}</td></tr>
|
jaroslav@68
|
6454 |
* <tr><td>{@code '\n'}</td> <td>{@code U+000A}</td>
|
jaroslav@68
|
6455 |
* <td>{@code NEW LINE}</td></tr>
|
jaroslav@68
|
6456 |
* <tr><td>{@code '\f'}</td> <td>{@code U+000C}</td>
|
jaroslav@68
|
6457 |
* <td>{@code FORM FEED}</td></tr>
|
jaroslav@68
|
6458 |
* <tr><td>{@code '\r'}</td> <td>{@code U+000D}</td>
|
jaroslav@68
|
6459 |
* <td>{@code CARRIAGE RETURN}</td></tr>
|
jaroslav@68
|
6460 |
* <tr><td>{@code ' '}</td> <td>{@code U+0020}</td>
|
jaroslav@68
|
6461 |
* <td>{@code SPACE}</td></tr>
|
jaroslav@68
|
6462 |
* </table>
|
jaroslav@68
|
6463 |
*
|
jaroslav@68
|
6464 |
* @param ch the character to be tested.
|
jaroslav@68
|
6465 |
* @return {@code true} if the character is ISO-LATIN-1 white
|
jaroslav@68
|
6466 |
* space; {@code false} otherwise.
|
jaroslav@68
|
6467 |
* @see Character#isSpaceChar(char)
|
jaroslav@68
|
6468 |
* @see Character#isWhitespace(char)
|
jaroslav@68
|
6469 |
* @deprecated Replaced by isWhitespace(char).
|
jaroslav@68
|
6470 |
*/
|
jaroslav@68
|
6471 |
@Deprecated
|
jaroslav@68
|
6472 |
public static boolean isSpace(char ch) {
|
jaroslav@68
|
6473 |
return (ch <= 0x0020) &&
|
jaroslav@68
|
6474 |
(((((1L << 0x0009) |
|
jaroslav@68
|
6475 |
(1L << 0x000A) |
|
jaroslav@68
|
6476 |
(1L << 0x000C) |
|
jaroslav@68
|
6477 |
(1L << 0x000D) |
|
jaroslav@68
|
6478 |
(1L << 0x0020)) >> ch) & 1L) != 0);
|
jaroslav@68
|
6479 |
}
|
jaroslav@68
|
6480 |
|
jaroslav@68
|
6481 |
|
jaroslav@68
|
6482 |
/**
|
jaroslav@68
|
6483 |
* Determines if the specified character is a Unicode space character.
|
jaroslav@68
|
6484 |
* A character is considered to be a space character if and only if
|
jaroslav@68
|
6485 |
* it is specified to be a space character by the Unicode Standard. This
|
jaroslav@68
|
6486 |
* method returns true if the character's general category type is any of
|
jaroslav@68
|
6487 |
* the following:
|
jaroslav@68
|
6488 |
* <ul>
|
jaroslav@68
|
6489 |
* <li> {@code SPACE_SEPARATOR}
|
jaroslav@68
|
6490 |
* <li> {@code LINE_SEPARATOR}
|
jaroslav@68
|
6491 |
* <li> {@code PARAGRAPH_SEPARATOR}
|
jaroslav@68
|
6492 |
* </ul>
|
jaroslav@68
|
6493 |
*
|
jaroslav@68
|
6494 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6495 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6496 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6497 |
* the {@link #isSpaceChar(int)} method.
|
jaroslav@68
|
6498 |
*
|
jaroslav@68
|
6499 |
* @param ch the character to be tested.
|
jaroslav@68
|
6500 |
* @return {@code true} if the character is a space character;
|
jaroslav@68
|
6501 |
* {@code false} otherwise.
|
jaroslav@68
|
6502 |
* @see Character#isWhitespace(char)
|
jaroslav@68
|
6503 |
* @since 1.1
|
jaroslav@68
|
6504 |
*/
|
jaroslav@68
|
6505 |
public static boolean isSpaceChar(char ch) {
|
jaroslav@68
|
6506 |
return isSpaceChar((int)ch);
|
jaroslav@68
|
6507 |
}
|
jaroslav@68
|
6508 |
|
jaroslav@68
|
6509 |
/**
|
jaroslav@68
|
6510 |
* Determines if the specified character (Unicode code point) is a
|
jaroslav@68
|
6511 |
* Unicode space character. A character is considered to be a
|
jaroslav@68
|
6512 |
* space character if and only if it is specified to be a space
|
jaroslav@68
|
6513 |
* character by the Unicode Standard. This method returns true if
|
jaroslav@68
|
6514 |
* the character's general category type is any of the following:
|
jaroslav@68
|
6515 |
*
|
jaroslav@68
|
6516 |
* <ul>
|
jaroslav@68
|
6517 |
* <li> {@link #SPACE_SEPARATOR}
|
jaroslav@68
|
6518 |
* <li> {@link #LINE_SEPARATOR}
|
jaroslav@68
|
6519 |
* <li> {@link #PARAGRAPH_SEPARATOR}
|
jaroslav@68
|
6520 |
* </ul>
|
jaroslav@68
|
6521 |
*
|
jaroslav@68
|
6522 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6523 |
* @return {@code true} if the character is a space character;
|
jaroslav@68
|
6524 |
* {@code false} otherwise.
|
jaroslav@68
|
6525 |
* @see Character#isWhitespace(int)
|
jaroslav@68
|
6526 |
* @since 1.5
|
jaroslav@68
|
6527 |
*/
|
jaroslav@68
|
6528 |
public static boolean isSpaceChar(int codePoint) {
|
jaroslav@68
|
6529 |
return ((((1 << Character.SPACE_SEPARATOR) |
|
jaroslav@68
|
6530 |
(1 << Character.LINE_SEPARATOR) |
|
jaroslav@68
|
6531 |
(1 << Character.PARAGRAPH_SEPARATOR)) >> getType(codePoint)) & 1)
|
jaroslav@68
|
6532 |
!= 0;
|
jaroslav@68
|
6533 |
}
|
jaroslav@68
|
6534 |
|
jaroslav@68
|
6535 |
/**
|
jaroslav@68
|
6536 |
* Determines if the specified character is white space according to Java.
|
jaroslav@68
|
6537 |
* A character is a Java whitespace character if and only if it satisfies
|
jaroslav@68
|
6538 |
* one of the following criteria:
|
jaroslav@68
|
6539 |
* <ul>
|
jaroslav@68
|
6540 |
* <li> It is a Unicode space character ({@code SPACE_SEPARATOR},
|
jaroslav@68
|
6541 |
* {@code LINE_SEPARATOR}, or {@code PARAGRAPH_SEPARATOR})
|
jaroslav@68
|
6542 |
* but is not also a non-breaking space ({@code '\u005Cu00A0'},
|
jaroslav@68
|
6543 |
* {@code '\u005Cu2007'}, {@code '\u005Cu202F'}).
|
jaroslav@68
|
6544 |
* <li> It is {@code '\u005Ct'}, U+0009 HORIZONTAL TABULATION.
|
jaroslav@68
|
6545 |
* <li> It is {@code '\u005Cn'}, U+000A LINE FEED.
|
jaroslav@68
|
6546 |
* <li> It is {@code '\u005Cu000B'}, U+000B VERTICAL TABULATION.
|
jaroslav@68
|
6547 |
* <li> It is {@code '\u005Cf'}, U+000C FORM FEED.
|
jaroslav@68
|
6548 |
* <li> It is {@code '\u005Cr'}, U+000D CARRIAGE RETURN.
|
jaroslav@68
|
6549 |
* <li> It is {@code '\u005Cu001C'}, U+001C FILE SEPARATOR.
|
jaroslav@68
|
6550 |
* <li> It is {@code '\u005Cu001D'}, U+001D GROUP SEPARATOR.
|
jaroslav@68
|
6551 |
* <li> It is {@code '\u005Cu001E'}, U+001E RECORD SEPARATOR.
|
jaroslav@68
|
6552 |
* <li> It is {@code '\u005Cu001F'}, U+001F UNIT SEPARATOR.
|
jaroslav@68
|
6553 |
* </ul>
|
jaroslav@68
|
6554 |
*
|
jaroslav@68
|
6555 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6556 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6557 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6558 |
* the {@link #isWhitespace(int)} method.
|
jaroslav@68
|
6559 |
*
|
jaroslav@68
|
6560 |
* @param ch the character to be tested.
|
jaroslav@68
|
6561 |
* @return {@code true} if the character is a Java whitespace
|
jaroslav@68
|
6562 |
* character; {@code false} otherwise.
|
jaroslav@68
|
6563 |
* @see Character#isSpaceChar(char)
|
jaroslav@68
|
6564 |
* @since 1.1
|
jaroslav@68
|
6565 |
*/
|
jaroslav@68
|
6566 |
public static boolean isWhitespace(char ch) {
|
jaroslav@68
|
6567 |
return isWhitespace((int)ch);
|
jaroslav@68
|
6568 |
}
|
jaroslav@68
|
6569 |
|
jaroslav@68
|
6570 |
/**
|
jaroslav@68
|
6571 |
* Determines if the specified character (Unicode code point) is
|
jaroslav@68
|
6572 |
* white space according to Java. A character is a Java
|
jaroslav@68
|
6573 |
* whitespace character if and only if it satisfies one of the
|
jaroslav@68
|
6574 |
* following criteria:
|
jaroslav@68
|
6575 |
* <ul>
|
jaroslav@68
|
6576 |
* <li> It is a Unicode space character ({@link #SPACE_SEPARATOR},
|
jaroslav@68
|
6577 |
* {@link #LINE_SEPARATOR}, or {@link #PARAGRAPH_SEPARATOR})
|
jaroslav@68
|
6578 |
* but is not also a non-breaking space ({@code '\u005Cu00A0'},
|
jaroslav@68
|
6579 |
* {@code '\u005Cu2007'}, {@code '\u005Cu202F'}).
|
jaroslav@68
|
6580 |
* <li> It is {@code '\u005Ct'}, U+0009 HORIZONTAL TABULATION.
|
jaroslav@68
|
6581 |
* <li> It is {@code '\u005Cn'}, U+000A LINE FEED.
|
jaroslav@68
|
6582 |
* <li> It is {@code '\u005Cu000B'}, U+000B VERTICAL TABULATION.
|
jaroslav@68
|
6583 |
* <li> It is {@code '\u005Cf'}, U+000C FORM FEED.
|
jaroslav@68
|
6584 |
* <li> It is {@code '\u005Cr'}, U+000D CARRIAGE RETURN.
|
jaroslav@68
|
6585 |
* <li> It is {@code '\u005Cu001C'}, U+001C FILE SEPARATOR.
|
jaroslav@68
|
6586 |
* <li> It is {@code '\u005Cu001D'}, U+001D GROUP SEPARATOR.
|
jaroslav@68
|
6587 |
* <li> It is {@code '\u005Cu001E'}, U+001E RECORD SEPARATOR.
|
jaroslav@68
|
6588 |
* <li> It is {@code '\u005Cu001F'}, U+001F UNIT SEPARATOR.
|
jaroslav@68
|
6589 |
* </ul>
|
jaroslav@68
|
6590 |
* <p>
|
jaroslav@68
|
6591 |
*
|
jaroslav@68
|
6592 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6593 |
* @return {@code true} if the character is a Java whitespace
|
jaroslav@68
|
6594 |
* character; {@code false} otherwise.
|
jaroslav@68
|
6595 |
* @see Character#isSpaceChar(int)
|
jaroslav@68
|
6596 |
* @since 1.5
|
jaroslav@68
|
6597 |
*/
|
jaroslav@68
|
6598 |
public static boolean isWhitespace(int codePoint) {
|
jaroslav@68
|
6599 |
return CharacterData.of(codePoint).isWhitespace(codePoint);
|
jaroslav@68
|
6600 |
}
|
jaroslav@68
|
6601 |
|
jaroslav@68
|
6602 |
/**
|
jaroslav@68
|
6603 |
* Determines if the specified character is an ISO control
|
jaroslav@68
|
6604 |
* character. A character is considered to be an ISO control
|
jaroslav@68
|
6605 |
* character if its code is in the range {@code '\u005Cu0000'}
|
jaroslav@68
|
6606 |
* through {@code '\u005Cu001F'} or in the range
|
jaroslav@68
|
6607 |
* {@code '\u005Cu007F'} through {@code '\u005Cu009F'}.
|
jaroslav@68
|
6608 |
*
|
jaroslav@68
|
6609 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6610 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6611 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6612 |
* the {@link #isISOControl(int)} method.
|
jaroslav@68
|
6613 |
*
|
jaroslav@68
|
6614 |
* @param ch the character to be tested.
|
jaroslav@68
|
6615 |
* @return {@code true} if the character is an ISO control character;
|
jaroslav@68
|
6616 |
* {@code false} otherwise.
|
jaroslav@68
|
6617 |
*
|
jaroslav@68
|
6618 |
* @see Character#isSpaceChar(char)
|
jaroslav@68
|
6619 |
* @see Character#isWhitespace(char)
|
jaroslav@68
|
6620 |
* @since 1.1
|
jaroslav@68
|
6621 |
*/
|
jaroslav@68
|
6622 |
public static boolean isISOControl(char ch) {
|
jaroslav@68
|
6623 |
return isISOControl((int)ch);
|
jaroslav@68
|
6624 |
}
|
jaroslav@68
|
6625 |
|
jaroslav@68
|
6626 |
/**
|
jaroslav@68
|
6627 |
* Determines if the referenced character (Unicode code point) is an ISO control
|
jaroslav@68
|
6628 |
* character. A character is considered to be an ISO control
|
jaroslav@68
|
6629 |
* character if its code is in the range {@code '\u005Cu0000'}
|
jaroslav@68
|
6630 |
* through {@code '\u005Cu001F'} or in the range
|
jaroslav@68
|
6631 |
* {@code '\u005Cu007F'} through {@code '\u005Cu009F'}.
|
jaroslav@68
|
6632 |
*
|
jaroslav@68
|
6633 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6634 |
* @return {@code true} if the character is an ISO control character;
|
jaroslav@68
|
6635 |
* {@code false} otherwise.
|
jaroslav@68
|
6636 |
* @see Character#isSpaceChar(int)
|
jaroslav@68
|
6637 |
* @see Character#isWhitespace(int)
|
jaroslav@68
|
6638 |
* @since 1.5
|
jaroslav@68
|
6639 |
*/
|
jaroslav@68
|
6640 |
public static boolean isISOControl(int codePoint) {
|
jaroslav@68
|
6641 |
// Optimized form of:
|
jaroslav@68
|
6642 |
// (codePoint >= 0x00 && codePoint <= 0x1F) ||
|
jaroslav@68
|
6643 |
// (codePoint >= 0x7F && codePoint <= 0x9F);
|
jaroslav@68
|
6644 |
return codePoint <= 0x9F &&
|
jaroslav@68
|
6645 |
(codePoint >= 0x7F || (codePoint >>> 5 == 0));
|
jaroslav@68
|
6646 |
}
|
jaroslav@68
|
6647 |
|
jaroslav@68
|
6648 |
/**
|
jaroslav@68
|
6649 |
* Returns a value indicating a character's general category.
|
jaroslav@68
|
6650 |
*
|
jaroslav@68
|
6651 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6652 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6653 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6654 |
* the {@link #getType(int)} method.
|
jaroslav@68
|
6655 |
*
|
jaroslav@68
|
6656 |
* @param ch the character to be tested.
|
jaroslav@68
|
6657 |
* @return a value of type {@code int} representing the
|
jaroslav@68
|
6658 |
* character's general category.
|
jaroslav@68
|
6659 |
* @see Character#COMBINING_SPACING_MARK
|
jaroslav@68
|
6660 |
* @see Character#CONNECTOR_PUNCTUATION
|
jaroslav@68
|
6661 |
* @see Character#CONTROL
|
jaroslav@68
|
6662 |
* @see Character#CURRENCY_SYMBOL
|
jaroslav@68
|
6663 |
* @see Character#DASH_PUNCTUATION
|
jaroslav@68
|
6664 |
* @see Character#DECIMAL_DIGIT_NUMBER
|
jaroslav@68
|
6665 |
* @see Character#ENCLOSING_MARK
|
jaroslav@68
|
6666 |
* @see Character#END_PUNCTUATION
|
jaroslav@68
|
6667 |
* @see Character#FINAL_QUOTE_PUNCTUATION
|
jaroslav@68
|
6668 |
* @see Character#FORMAT
|
jaroslav@68
|
6669 |
* @see Character#INITIAL_QUOTE_PUNCTUATION
|
jaroslav@68
|
6670 |
* @see Character#LETTER_NUMBER
|
jaroslav@68
|
6671 |
* @see Character#LINE_SEPARATOR
|
jaroslav@68
|
6672 |
* @see Character#LOWERCASE_LETTER
|
jaroslav@68
|
6673 |
* @see Character#MATH_SYMBOL
|
jaroslav@68
|
6674 |
* @see Character#MODIFIER_LETTER
|
jaroslav@68
|
6675 |
* @see Character#MODIFIER_SYMBOL
|
jaroslav@68
|
6676 |
* @see Character#NON_SPACING_MARK
|
jaroslav@68
|
6677 |
* @see Character#OTHER_LETTER
|
jaroslav@68
|
6678 |
* @see Character#OTHER_NUMBER
|
jaroslav@68
|
6679 |
* @see Character#OTHER_PUNCTUATION
|
jaroslav@68
|
6680 |
* @see Character#OTHER_SYMBOL
|
jaroslav@68
|
6681 |
* @see Character#PARAGRAPH_SEPARATOR
|
jaroslav@68
|
6682 |
* @see Character#PRIVATE_USE
|
jaroslav@68
|
6683 |
* @see Character#SPACE_SEPARATOR
|
jaroslav@68
|
6684 |
* @see Character#START_PUNCTUATION
|
jaroslav@68
|
6685 |
* @see Character#SURROGATE
|
jaroslav@68
|
6686 |
* @see Character#TITLECASE_LETTER
|
jaroslav@68
|
6687 |
* @see Character#UNASSIGNED
|
jaroslav@68
|
6688 |
* @see Character#UPPERCASE_LETTER
|
jaroslav@68
|
6689 |
* @since 1.1
|
jaroslav@68
|
6690 |
*/
|
jaroslav@68
|
6691 |
public static int getType(char ch) {
|
jaroslav@68
|
6692 |
return getType((int)ch);
|
jaroslav@68
|
6693 |
}
|
jaroslav@68
|
6694 |
|
jaroslav@68
|
6695 |
/**
|
jaroslav@68
|
6696 |
* Returns a value indicating a character's general category.
|
jaroslav@68
|
6697 |
*
|
jaroslav@68
|
6698 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6699 |
* @return a value of type {@code int} representing the
|
jaroslav@68
|
6700 |
* character's general category.
|
jaroslav@68
|
6701 |
* @see Character#COMBINING_SPACING_MARK COMBINING_SPACING_MARK
|
jaroslav@68
|
6702 |
* @see Character#CONNECTOR_PUNCTUATION CONNECTOR_PUNCTUATION
|
jaroslav@68
|
6703 |
* @see Character#CONTROL CONTROL
|
jaroslav@68
|
6704 |
* @see Character#CURRENCY_SYMBOL CURRENCY_SYMBOL
|
jaroslav@68
|
6705 |
* @see Character#DASH_PUNCTUATION DASH_PUNCTUATION
|
jaroslav@68
|
6706 |
* @see Character#DECIMAL_DIGIT_NUMBER DECIMAL_DIGIT_NUMBER
|
jaroslav@68
|
6707 |
* @see Character#ENCLOSING_MARK ENCLOSING_MARK
|
jaroslav@68
|
6708 |
* @see Character#END_PUNCTUATION END_PUNCTUATION
|
jaroslav@68
|
6709 |
* @see Character#FINAL_QUOTE_PUNCTUATION FINAL_QUOTE_PUNCTUATION
|
jaroslav@68
|
6710 |
* @see Character#FORMAT FORMAT
|
jaroslav@68
|
6711 |
* @see Character#INITIAL_QUOTE_PUNCTUATION INITIAL_QUOTE_PUNCTUATION
|
jaroslav@68
|
6712 |
* @see Character#LETTER_NUMBER LETTER_NUMBER
|
jaroslav@68
|
6713 |
* @see Character#LINE_SEPARATOR LINE_SEPARATOR
|
jaroslav@68
|
6714 |
* @see Character#LOWERCASE_LETTER LOWERCASE_LETTER
|
jaroslav@68
|
6715 |
* @see Character#MATH_SYMBOL MATH_SYMBOL
|
jaroslav@68
|
6716 |
* @see Character#MODIFIER_LETTER MODIFIER_LETTER
|
jaroslav@68
|
6717 |
* @see Character#MODIFIER_SYMBOL MODIFIER_SYMBOL
|
jaroslav@68
|
6718 |
* @see Character#NON_SPACING_MARK NON_SPACING_MARK
|
jaroslav@68
|
6719 |
* @see Character#OTHER_LETTER OTHER_LETTER
|
jaroslav@68
|
6720 |
* @see Character#OTHER_NUMBER OTHER_NUMBER
|
jaroslav@68
|
6721 |
* @see Character#OTHER_PUNCTUATION OTHER_PUNCTUATION
|
jaroslav@68
|
6722 |
* @see Character#OTHER_SYMBOL OTHER_SYMBOL
|
jaroslav@68
|
6723 |
* @see Character#PARAGRAPH_SEPARATOR PARAGRAPH_SEPARATOR
|
jaroslav@68
|
6724 |
* @see Character#PRIVATE_USE PRIVATE_USE
|
jaroslav@68
|
6725 |
* @see Character#SPACE_SEPARATOR SPACE_SEPARATOR
|
jaroslav@68
|
6726 |
* @see Character#START_PUNCTUATION START_PUNCTUATION
|
jaroslav@68
|
6727 |
* @see Character#SURROGATE SURROGATE
|
jaroslav@68
|
6728 |
* @see Character#TITLECASE_LETTER TITLECASE_LETTER
|
jaroslav@68
|
6729 |
* @see Character#UNASSIGNED UNASSIGNED
|
jaroslav@68
|
6730 |
* @see Character#UPPERCASE_LETTER UPPERCASE_LETTER
|
jaroslav@68
|
6731 |
* @since 1.5
|
jaroslav@68
|
6732 |
*/
|
jaroslav@68
|
6733 |
public static int getType(int codePoint) {
|
jaroslav@68
|
6734 |
return CharacterData.of(codePoint).getType(codePoint);
|
jaroslav@68
|
6735 |
}
|
jaroslav@68
|
6736 |
|
jaroslav@68
|
6737 |
/**
|
jaroslav@68
|
6738 |
* Determines the character representation for a specific digit in
|
jaroslav@68
|
6739 |
* the specified radix. If the value of {@code radix} is not a
|
jaroslav@68
|
6740 |
* valid radix, or the value of {@code digit} is not a valid
|
jaroslav@68
|
6741 |
* digit in the specified radix, the null character
|
jaroslav@68
|
6742 |
* ({@code '\u005Cu0000'}) is returned.
|
jaroslav@68
|
6743 |
* <p>
|
jaroslav@68
|
6744 |
* The {@code radix} argument is valid if it is greater than or
|
jaroslav@68
|
6745 |
* equal to {@code MIN_RADIX} and less than or equal to
|
jaroslav@68
|
6746 |
* {@code MAX_RADIX}. The {@code digit} argument is valid if
|
jaroslav@68
|
6747 |
* {@code 0 <= digit < radix}.
|
jaroslav@68
|
6748 |
* <p>
|
jaroslav@68
|
6749 |
* If the digit is less than 10, then
|
jaroslav@68
|
6750 |
* {@code '0' + digit} is returned. Otherwise, the value
|
jaroslav@68
|
6751 |
* {@code 'a' + digit - 10} is returned.
|
jaroslav@68
|
6752 |
*
|
jaroslav@68
|
6753 |
* @param digit the number to convert to a character.
|
jaroslav@68
|
6754 |
* @param radix the radix.
|
jaroslav@68
|
6755 |
* @return the {@code char} representation of the specified digit
|
jaroslav@68
|
6756 |
* in the specified radix.
|
jaroslav@68
|
6757 |
* @see Character#MIN_RADIX
|
jaroslav@68
|
6758 |
* @see Character#MAX_RADIX
|
jaroslav@68
|
6759 |
* @see Character#digit(char, int)
|
jaroslav@68
|
6760 |
*/
|
jaroslav@68
|
6761 |
public static char forDigit(int digit, int radix) {
|
jaroslav@68
|
6762 |
if ((digit >= radix) || (digit < 0)) {
|
jaroslav@68
|
6763 |
return '\0';
|
jaroslav@68
|
6764 |
}
|
jaroslav@68
|
6765 |
if ((radix < Character.MIN_RADIX) || (radix > Character.MAX_RADIX)) {
|
jaroslav@68
|
6766 |
return '\0';
|
jaroslav@68
|
6767 |
}
|
jaroslav@68
|
6768 |
if (digit < 10) {
|
jaroslav@68
|
6769 |
return (char)('0' + digit);
|
jaroslav@68
|
6770 |
}
|
jaroslav@68
|
6771 |
return (char)('a' - 10 + digit);
|
jaroslav@68
|
6772 |
}
|
jaroslav@68
|
6773 |
|
jaroslav@68
|
6774 |
/**
|
jaroslav@68
|
6775 |
* Returns the Unicode directionality property for the given
|
jaroslav@68
|
6776 |
* character. Character directionality is used to calculate the
|
jaroslav@68
|
6777 |
* visual ordering of text. The directionality value of undefined
|
jaroslav@68
|
6778 |
* {@code char} values is {@code DIRECTIONALITY_UNDEFINED}.
|
jaroslav@68
|
6779 |
*
|
jaroslav@68
|
6780 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6781 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6782 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6783 |
* the {@link #getDirectionality(int)} method.
|
jaroslav@68
|
6784 |
*
|
jaroslav@68
|
6785 |
* @param ch {@code char} for which the directionality property
|
jaroslav@68
|
6786 |
* is requested.
|
jaroslav@68
|
6787 |
* @return the directionality property of the {@code char} value.
|
jaroslav@68
|
6788 |
*
|
jaroslav@68
|
6789 |
* @see Character#DIRECTIONALITY_UNDEFINED
|
jaroslav@68
|
6790 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT
|
jaroslav@68
|
6791 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT
|
jaroslav@68
|
6792 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
|
jaroslav@68
|
6793 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER
|
jaroslav@68
|
6794 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
|
jaroslav@68
|
6795 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
|
jaroslav@68
|
6796 |
* @see Character#DIRECTIONALITY_ARABIC_NUMBER
|
jaroslav@68
|
6797 |
* @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
|
jaroslav@68
|
6798 |
* @see Character#DIRECTIONALITY_NONSPACING_MARK
|
jaroslav@68
|
6799 |
* @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL
|
jaroslav@68
|
6800 |
* @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR
|
jaroslav@68
|
6801 |
* @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR
|
jaroslav@68
|
6802 |
* @see Character#DIRECTIONALITY_WHITESPACE
|
jaroslav@68
|
6803 |
* @see Character#DIRECTIONALITY_OTHER_NEUTRALS
|
jaroslav@68
|
6804 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
|
jaroslav@68
|
6805 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
|
jaroslav@68
|
6806 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
|
jaroslav@68
|
6807 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
|
jaroslav@68
|
6808 |
* @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
|
jaroslav@68
|
6809 |
* @since 1.4
|
jaroslav@68
|
6810 |
*/
|
jaroslav@68
|
6811 |
public static byte getDirectionality(char ch) {
|
jaroslav@68
|
6812 |
return getDirectionality((int)ch);
|
jaroslav@68
|
6813 |
}
|
jaroslav@68
|
6814 |
|
jaroslav@68
|
6815 |
/**
|
jaroslav@68
|
6816 |
* Returns the Unicode directionality property for the given
|
jaroslav@68
|
6817 |
* character (Unicode code point). Character directionality is
|
jaroslav@68
|
6818 |
* used to calculate the visual ordering of text. The
|
jaroslav@68
|
6819 |
* directionality value of undefined character is {@link
|
jaroslav@68
|
6820 |
* #DIRECTIONALITY_UNDEFINED}.
|
jaroslav@68
|
6821 |
*
|
jaroslav@68
|
6822 |
* @param codePoint the character (Unicode code point) for which
|
jaroslav@68
|
6823 |
* the directionality property is requested.
|
jaroslav@68
|
6824 |
* @return the directionality property of the character.
|
jaroslav@68
|
6825 |
*
|
jaroslav@68
|
6826 |
* @see Character#DIRECTIONALITY_UNDEFINED DIRECTIONALITY_UNDEFINED
|
jaroslav@68
|
6827 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT DIRECTIONALITY_LEFT_TO_RIGHT
|
jaroslav@68
|
6828 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT DIRECTIONALITY_RIGHT_TO_LEFT
|
jaroslav@68
|
6829 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
|
jaroslav@68
|
6830 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER DIRECTIONALITY_EUROPEAN_NUMBER
|
jaroslav@68
|
6831 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
|
jaroslav@68
|
6832 |
* @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
|
jaroslav@68
|
6833 |
* @see Character#DIRECTIONALITY_ARABIC_NUMBER DIRECTIONALITY_ARABIC_NUMBER
|
jaroslav@68
|
6834 |
* @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
|
jaroslav@68
|
6835 |
* @see Character#DIRECTIONALITY_NONSPACING_MARK DIRECTIONALITY_NONSPACING_MARK
|
jaroslav@68
|
6836 |
* @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL DIRECTIONALITY_BOUNDARY_NEUTRAL
|
jaroslav@68
|
6837 |
* @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR DIRECTIONALITY_PARAGRAPH_SEPARATOR
|
jaroslav@68
|
6838 |
* @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR DIRECTIONALITY_SEGMENT_SEPARATOR
|
jaroslav@68
|
6839 |
* @see Character#DIRECTIONALITY_WHITESPACE DIRECTIONALITY_WHITESPACE
|
jaroslav@68
|
6840 |
* @see Character#DIRECTIONALITY_OTHER_NEUTRALS DIRECTIONALITY_OTHER_NEUTRALS
|
jaroslav@68
|
6841 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
|
jaroslav@68
|
6842 |
* @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
|
jaroslav@68
|
6843 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
|
jaroslav@68
|
6844 |
* @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
|
jaroslav@68
|
6845 |
* @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
|
jaroslav@68
|
6846 |
* @since 1.5
|
jaroslav@68
|
6847 |
*/
|
jaroslav@68
|
6848 |
public static byte getDirectionality(int codePoint) {
|
jaroslav@68
|
6849 |
return CharacterData.of(codePoint).getDirectionality(codePoint);
|
jaroslav@68
|
6850 |
}
|
jaroslav@68
|
6851 |
|
jaroslav@68
|
6852 |
/**
|
jaroslav@68
|
6853 |
* Determines whether the character is mirrored according to the
|
jaroslav@68
|
6854 |
* Unicode specification. Mirrored characters should have their
|
jaroslav@68
|
6855 |
* glyphs horizontally mirrored when displayed in text that is
|
jaroslav@68
|
6856 |
* right-to-left. For example, {@code '\u005Cu0028'} LEFT
|
jaroslav@68
|
6857 |
* PARENTHESIS is semantically defined to be an <i>opening
|
jaroslav@68
|
6858 |
* parenthesis</i>. This will appear as a "(" in text that is
|
jaroslav@68
|
6859 |
* left-to-right but as a ")" in text that is right-to-left.
|
jaroslav@68
|
6860 |
*
|
jaroslav@68
|
6861 |
* <p><b>Note:</b> This method cannot handle <a
|
jaroslav@68
|
6862 |
* href="#supplementary"> supplementary characters</a>. To support
|
jaroslav@68
|
6863 |
* all Unicode characters, including supplementary characters, use
|
jaroslav@68
|
6864 |
* the {@link #isMirrored(int)} method.
|
jaroslav@68
|
6865 |
*
|
jaroslav@68
|
6866 |
* @param ch {@code char} for which the mirrored property is requested
|
jaroslav@68
|
6867 |
* @return {@code true} if the char is mirrored, {@code false}
|
jaroslav@68
|
6868 |
* if the {@code char} is not mirrored or is not defined.
|
jaroslav@68
|
6869 |
* @since 1.4
|
jaroslav@68
|
6870 |
*/
|
jaroslav@68
|
6871 |
public static boolean isMirrored(char ch) {
|
jaroslav@68
|
6872 |
return isMirrored((int)ch);
|
jaroslav@68
|
6873 |
}
|
jaroslav@68
|
6874 |
|
jaroslav@68
|
6875 |
/**
|
jaroslav@68
|
6876 |
* Determines whether the specified character (Unicode code point)
|
jaroslav@68
|
6877 |
* is mirrored according to the Unicode specification. Mirrored
|
jaroslav@68
|
6878 |
* characters should have their glyphs horizontally mirrored when
|
jaroslav@68
|
6879 |
* displayed in text that is right-to-left. For example,
|
jaroslav@68
|
6880 |
* {@code '\u005Cu0028'} LEFT PARENTHESIS is semantically
|
jaroslav@68
|
6881 |
* defined to be an <i>opening parenthesis</i>. This will appear
|
jaroslav@68
|
6882 |
* as a "(" in text that is left-to-right but as a ")" in text
|
jaroslav@68
|
6883 |
* that is right-to-left.
|
jaroslav@68
|
6884 |
*
|
jaroslav@68
|
6885 |
* @param codePoint the character (Unicode code point) to be tested.
|
jaroslav@68
|
6886 |
* @return {@code true} if the character is mirrored, {@code false}
|
jaroslav@68
|
6887 |
* if the character is not mirrored or is not defined.
|
jaroslav@68
|
6888 |
* @since 1.5
|
jaroslav@68
|
6889 |
*/
|
jaroslav@68
|
6890 |
public static boolean isMirrored(int codePoint) {
|
jaroslav@68
|
6891 |
return CharacterData.of(codePoint).isMirrored(codePoint);
|
jaroslav@68
|
6892 |
}
|
jaroslav@68
|
6893 |
|
jaroslav@68
|
6894 |
/**
|
jaroslav@68
|
6895 |
* Compares two {@code Character} objects numerically.
|
jaroslav@68
|
6896 |
*
|
jaroslav@68
|
6897 |
* @param anotherCharacter the {@code Character} to be compared.
|
jaroslav@68
|
6898 |
|
jaroslav@68
|
6899 |
* @return the value {@code 0} if the argument {@code Character}
|
jaroslav@68
|
6900 |
* is equal to this {@code Character}; a value less than
|
jaroslav@68
|
6901 |
* {@code 0} if this {@code Character} is numerically less
|
jaroslav@68
|
6902 |
* than the {@code Character} argument; and a value greater than
|
jaroslav@68
|
6903 |
* {@code 0} if this {@code Character} is numerically greater
|
jaroslav@68
|
6904 |
* than the {@code Character} argument (unsigned comparison).
|
jaroslav@68
|
6905 |
* Note that this is strictly a numerical comparison; it is not
|
jaroslav@68
|
6906 |
* locale-dependent.
|
jaroslav@68
|
6907 |
* @since 1.2
|
jaroslav@68
|
6908 |
*/
|
jaroslav@68
|
6909 |
public int compareTo(Character anotherCharacter) {
|
jaroslav@68
|
6910 |
return compare(this.value, anotherCharacter.value);
|
jaroslav@68
|
6911 |
}
|
jaroslav@68
|
6912 |
|
jaroslav@68
|
6913 |
/**
|
jaroslav@68
|
6914 |
* Compares two {@code char} values numerically.
|
jaroslav@68
|
6915 |
* The value returned is identical to what would be returned by:
|
jaroslav@68
|
6916 |
* <pre>
|
jaroslav@68
|
6917 |
* Character.valueOf(x).compareTo(Character.valueOf(y))
|
jaroslav@68
|
6918 |
* </pre>
|
jaroslav@68
|
6919 |
*
|
jaroslav@68
|
6920 |
* @param x the first {@code char} to compare
|
jaroslav@68
|
6921 |
* @param y the second {@code char} to compare
|
jaroslav@68
|
6922 |
* @return the value {@code 0} if {@code x == y};
|
jaroslav@68
|
6923 |
* a value less than {@code 0} if {@code x < y}; and
|
jaroslav@68
|
6924 |
* a value greater than {@code 0} if {@code x > y}
|
jaroslav@68
|
6925 |
* @since 1.7
|
jaroslav@68
|
6926 |
*/
|
jaroslav@68
|
6927 |
public static int compare(char x, char y) {
|
jaroslav@68
|
6928 |
return x - y;
|
jaroslav@68
|
6929 |
}
|
jaroslav@68
|
6930 |
|
jaroslav@68
|
6931 |
/**
|
jaroslav@68
|
6932 |
* Converts the character (Unicode code point) argument to uppercase using
|
jaroslav@68
|
6933 |
* information from the UnicodeData file.
|
jaroslav@68
|
6934 |
* <p>
|
jaroslav@68
|
6935 |
*
|
jaroslav@68
|
6936 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6937 |
* @return either the uppercase equivalent of the character, if
|
jaroslav@68
|
6938 |
* any, or an error flag ({@code Character.ERROR})
|
jaroslav@68
|
6939 |
* that indicates that a 1:M {@code char} mapping exists.
|
jaroslav@68
|
6940 |
* @see Character#isLowerCase(char)
|
jaroslav@68
|
6941 |
* @see Character#isUpperCase(char)
|
jaroslav@68
|
6942 |
* @see Character#toLowerCase(char)
|
jaroslav@68
|
6943 |
* @see Character#toTitleCase(char)
|
jaroslav@68
|
6944 |
* @since 1.4
|
jaroslav@68
|
6945 |
*/
|
jaroslav@68
|
6946 |
static int toUpperCaseEx(int codePoint) {
|
jaroslav@68
|
6947 |
assert isValidCodePoint(codePoint);
|
jaroslav@68
|
6948 |
return CharacterData.of(codePoint).toUpperCaseEx(codePoint);
|
jaroslav@68
|
6949 |
}
|
jaroslav@68
|
6950 |
|
jaroslav@68
|
6951 |
/**
|
jaroslav@68
|
6952 |
* Converts the character (Unicode code point) argument to uppercase using case
|
jaroslav@68
|
6953 |
* mapping information from the SpecialCasing file in the Unicode
|
jaroslav@68
|
6954 |
* specification. If a character has no explicit uppercase
|
jaroslav@68
|
6955 |
* mapping, then the {@code char} itself is returned in the
|
jaroslav@68
|
6956 |
* {@code char[]}.
|
jaroslav@68
|
6957 |
*
|
jaroslav@68
|
6958 |
* @param codePoint the character (Unicode code point) to be converted.
|
jaroslav@68
|
6959 |
* @return a {@code char[]} with the uppercased character.
|
jaroslav@68
|
6960 |
* @since 1.4
|
jaroslav@68
|
6961 |
*/
|
jaroslav@68
|
6962 |
static char[] toUpperCaseCharArray(int codePoint) {
|
jaroslav@68
|
6963 |
// As of Unicode 6.0, 1:M uppercasings only happen in the BMP.
|
jaroslav@68
|
6964 |
assert isBmpCodePoint(codePoint);
|
jaroslav@68
|
6965 |
return CharacterData.of(codePoint).toUpperCaseCharArray(codePoint);
|
jaroslav@68
|
6966 |
}
|
jaroslav@68
|
6967 |
|
jaroslav@68
|
6968 |
/**
|
jaroslav@68
|
6969 |
* The number of bits used to represent a <tt>char</tt> value in unsigned
|
jaroslav@68
|
6970 |
* binary form, constant {@code 16}.
|
jaroslav@68
|
6971 |
*
|
jaroslav@68
|
6972 |
* @since 1.5
|
jaroslav@68
|
6973 |
*/
|
jaroslav@68
|
6974 |
public static final int SIZE = 16;
|
jaroslav@68
|
6975 |
|
jaroslav@68
|
6976 |
/**
|
jaroslav@68
|
6977 |
* Returns the value obtained by reversing the order of the bytes in the
|
jaroslav@68
|
6978 |
* specified <tt>char</tt> value.
|
jaroslav@68
|
6979 |
*
|
jaroslav@68
|
6980 |
* @return the value obtained by reversing (or, equivalently, swapping)
|
jaroslav@68
|
6981 |
* the bytes in the specified <tt>char</tt> value.
|
jaroslav@68
|
6982 |
* @since 1.5
|
jaroslav@68
|
6983 |
*/
|
jaroslav@68
|
6984 |
public static char reverseBytes(char ch) {
|
jaroslav@68
|
6985 |
return (char) (((ch & 0xFF00) >> 8) | (ch << 8));
|
jaroslav@68
|
6986 |
}
|
jaroslav@68
|
6987 |
|
jaroslav@68
|
6988 |
/**
|
jaroslav@68
|
6989 |
* Returns the Unicode name of the specified character
|
jaroslav@68
|
6990 |
* {@code codePoint}, or null if the code point is
|
jaroslav@68
|
6991 |
* {@link #UNASSIGNED unassigned}.
|
jaroslav@68
|
6992 |
* <p>
|
jaroslav@68
|
6993 |
* Note: if the specified character is not assigned a name by
|
jaroslav@68
|
6994 |
* the <i>UnicodeData</i> file (part of the Unicode Character
|
jaroslav@68
|
6995 |
* Database maintained by the Unicode Consortium), the returned
|
jaroslav@68
|
6996 |
* name is the same as the result of expression.
|
jaroslav@68
|
6997 |
*
|
jaroslav@68
|
6998 |
* <blockquote>{@code
|
jaroslav@68
|
6999 |
* Character.UnicodeBlock.of(codePoint).toString().replace('_', ' ')
|
jaroslav@68
|
7000 |
* + " "
|
jaroslav@68
|
7001 |
* + Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
|
jaroslav@68
|
7002 |
*
|
jaroslav@68
|
7003 |
* }</blockquote>
|
jaroslav@68
|
7004 |
*
|
jaroslav@68
|
7005 |
* @param codePoint the character (Unicode code point)
|
jaroslav@68
|
7006 |
*
|
jaroslav@68
|
7007 |
* @return the Unicode name of the specified character, or null if
|
jaroslav@68
|
7008 |
* the code point is unassigned.
|
jaroslav@68
|
7009 |
*
|
jaroslav@68
|
7010 |
* @exception IllegalArgumentException if the specified
|
jaroslav@68
|
7011 |
* {@code codePoint} is not a valid Unicode
|
jaroslav@68
|
7012 |
* code point.
|
jaroslav@68
|
7013 |
*
|
jaroslav@68
|
7014 |
* @since 1.7
|
jaroslav@68
|
7015 |
*/
|
jaroslav@68
|
7016 |
public static String getName(int codePoint) {
|
jaroslav@68
|
7017 |
if (!isValidCodePoint(codePoint)) {
|
jaroslav@68
|
7018 |
throw new IllegalArgumentException();
|
jaroslav@68
|
7019 |
}
|
jaroslav@68
|
7020 |
String name = CharacterName.get(codePoint);
|
jaroslav@68
|
7021 |
if (name != null)
|
jaroslav@68
|
7022 |
return name;
|
jaroslav@68
|
7023 |
if (getType(codePoint) == UNASSIGNED)
|
jaroslav@68
|
7024 |
return null;
|
jaroslav@68
|
7025 |
UnicodeBlock block = UnicodeBlock.of(codePoint);
|
jaroslav@68
|
7026 |
if (block != null)
|
jaroslav@68
|
7027 |
return block.toString().replace('_', ' ') + " "
|
jaroslav@68
|
7028 |
+ Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
|
jaroslav@68
|
7029 |
// should never come here
|
jaroslav@68
|
7030 |
return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
|
jaroslav@68
|
7031 |
}
|
jaroslav@68
|
7032 |
}
|