author | ihse |
Thu, 14 Nov 2013 11:19:32 +0100 | |
changeset 21805 | c7d7946239de |
parent 14411 | jdk/make/tools/GenerateCharacter/CharacterData01.java.template@65913e68c0a6 |
child 23010 | 6dadb192ad81 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
14411 | 2 |
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.lang; |
|
27 |
||
28 |
/** The CharacterData class encapsulates the large tables once found in |
|
29 |
* java.lang.Character. |
|
30 |
*/ |
|
31 |
||
32 |
class CharacterData01 extends CharacterData { |
|
33 |
/* The character properties are currently encoded into 32 bits in the following manner: |
|
34 |
1 bit mirrored property |
|
35 |
4 bits directionality property |
|
36 |
9 bits signed offset used for converting case |
|
37 |
1 bit if 1, adding the signed offset converts the character to lowercase |
|
38 |
1 bit if 1, subtracting the signed offset converts the character to uppercase |
|
39 |
1 bit if 1, this character has a titlecase equivalent (possibly itself) |
|
40 |
3 bits 0 may not be part of an identifier |
|
41 |
1 ignorable control; may continue a Unicode identifier or Java identifier |
|
42 |
2 may continue a Java identifier but not a Unicode identifier (unused) |
|
43 |
3 may continue a Unicode identifier or Java identifier |
|
44 |
4 is a Java whitespace character |
|
45 |
5 may start or continue a Java identifier; |
|
46 |
may continue but not start a Unicode identifier (underscores) |
|
47 |
6 may start or continue a Java identifier but not a Unicode identifier ($) |
|
48 |
7 may start or continue a Unicode identifier or Java identifier |
|
49 |
Thus: |
|
50 |
5, 6, 7 may start a Java identifier |
|
51 |
1, 2, 3, 5, 6, 7 may continue a Java identifier |
|
52 |
7 may start a Unicode identifier |
|
53 |
1, 3, 5, 7 may continue a Unicode identifier |
|
54 |
1 is ignorable within an identifier |
|
55 |
4 is Java whitespace |
|
56 |
2 bits 0 this character has no numeric property |
|
57 |
1 adding the digit offset to the character code and then |
|
58 |
masking with 0x1F will produce the desired numeric value |
|
59 |
2 this character has a "strange" numeric value |
|
60 |
3 a Java supradecimal digit: adding the digit offset to the |
|
61 |
character code, then masking with 0x1F, then adding 10 |
|
62 |
will produce the desired numeric value |
|
63 |
5 bits digit offset |
|
64 |
5 bits character type |
|
65 |
||
66 |
The encoding of character properties is subject to change at any time. |
|
67 |
*/ |
|
68 |
||
69 |
int getProperties(int ch) { |
|
70 |
char offset = (char)ch; |
|
71 |
int props = $$Lookup(offset); |
|
72 |
return props; |
|
73 |
} |
|
74 |
||
9535
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
75 |
int getPropertiesEx(int ch) { |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
76 |
char offset = (char)ch; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
77 |
int props = $$LookupEx(offset); |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
78 |
return props; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
79 |
} |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
80 |
|
2 | 81 |
int getType(int ch) { |
82 |
int props = getProperties(ch); |
|
83 |
return (props & $$maskType); |
|
84 |
} |
|
85 |
||
9535
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
86 |
boolean isOtherLowercase(int ch) { |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
87 |
int props = getPropertiesEx(ch); |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
88 |
return (props & $$maskOtherLowercase) != 0; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
89 |
} |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
90 |
|
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
91 |
boolean isOtherUppercase(int ch) { |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
92 |
int props = getPropertiesEx(ch); |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
93 |
return (props & $$maskOtherUppercase) != 0; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
94 |
} |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
95 |
|
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
96 |
boolean isOtherAlphabetic(int ch) { |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
97 |
int props = getPropertiesEx(ch); |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
98 |
return (props & $$maskOtherAlphabetic) != 0; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
99 |
} |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
100 |
|
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
101 |
boolean isIdeographic(int ch) { |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
102 |
int props = getPropertiesEx(ch); |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
103 |
return (props & $$maskIdeographic) != 0; |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
104 |
} |
d930011fd275
7037261: j.l.Character.isLowerCase/isUpperCase need to match the Unicode Standard
sherman
parents:
7247
diff
changeset
|
105 |
|
2 | 106 |
boolean isJavaIdentifierStart(int ch) { |
107 |
int props = getProperties(ch); |
|
108 |
return ((props & $$maskIdentifierInfo) >= $$lowJavaStart); |
|
109 |
} |
|
110 |
||
111 |
boolean isJavaIdentifierPart(int ch) { |
|
112 |
int props = getProperties(ch); |
|
113 |
return ((props & $$nonzeroJavaPart) != 0); |
|
114 |
} |
|
115 |
||
116 |
boolean isUnicodeIdentifierStart(int ch) { |
|
117 |
int props = getProperties(ch); |
|
118 |
return ((props & $$maskIdentifierInfo) == $$valueUnicodeStart); |
|
119 |
} |
|
120 |
||
121 |
boolean isUnicodeIdentifierPart(int ch) { |
|
122 |
int props = getProperties(ch); |
|
123 |
return ((props & $$maskUnicodePart) != 0); |
|
124 |
} |
|
125 |
||
126 |
boolean isIdentifierIgnorable(int ch) { |
|
127 |
int props = getProperties(ch); |
|
128 |
return ((props & $$maskIdentifierInfo) == $$valueIgnorable); |
|
129 |
} |
|
130 |
||
131 |
int toLowerCase(int ch) { |
|
132 |
int mapChar = ch; |
|
133 |
int val = getProperties(ch); |
|
134 |
||
135 |
if ((val & $$maskLowerCase) != 0) { |
|
136 |
int offset = val << $$shiftCaseOffsetSign >> ($$shiftCaseOffsetSign+$$shiftCaseOffset); |
|
137 |
mapChar = ch + offset; |
|
138 |
} |
|
139 |
return mapChar; |
|
140 |
} |
|
141 |
||
142 |
int toUpperCase(int ch) { |
|
143 |
int mapChar = ch; |
|
144 |
int val = getProperties(ch); |
|
145 |
||
146 |
if ((val & $$maskUpperCase) != 0) { |
|
147 |
int offset = val << $$shiftCaseOffsetSign >> ($$shiftCaseOffsetSign+$$shiftCaseOffset); |
|
148 |
mapChar = ch - offset; |
|
149 |
} |
|
150 |
return mapChar; |
|
151 |
} |
|
152 |
||
153 |
int toTitleCase(int ch) { |
|
154 |
int mapChar = ch; |
|
155 |
int val = getProperties(ch); |
|
156 |
||
157 |
if ((val & $$maskTitleCase) != 0) { |
|
158 |
// There is a titlecase equivalent. Perform further checks: |
|
159 |
if ((val & $$maskUpperCase) == 0) { |
|
160 |
// The character does not have an uppercase equivalent, so it must |
|
161 |
// already be uppercase; so add 1 to get the titlecase form. |
|
162 |
mapChar = ch + 1; |
|
163 |
} |
|
164 |
else if ((val & $$maskLowerCase) == 0) { |
|
165 |
// The character does not have a lowercase equivalent, so it must |
|
166 |
// already be lowercase; so subtract 1 to get the titlecase form. |
|
167 |
mapChar = ch - 1; |
|
168 |
} |
|
169 |
// else { |
|
170 |
// The character has both an uppercase equivalent and a lowercase |
|
171 |
// equivalent, so it must itself be a titlecase form; return it. |
|
172 |
// return ch; |
|
173 |
//} |
|
174 |
} |
|
175 |
else if ((val & $$maskUpperCase) != 0) { |
|
176 |
// This character has no titlecase equivalent but it does have an |
|
177 |
// uppercase equivalent, so use that (subtract the signed case offset). |
|
178 |
mapChar = toUpperCase(ch); |
|
179 |
} |
|
180 |
return mapChar; |
|
181 |
} |
|
182 |
||
183 |
int digit(int ch, int radix) { |
|
184 |
int value = -1; |
|
185 |
if (radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX) { |
|
186 |
int val = getProperties(ch); |
|
187 |
int kind = val & $$maskType; |
|
188 |
if (kind == Character.DECIMAL_DIGIT_NUMBER) { |
|
189 |
value = ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit; |
|
190 |
} |
|
191 |
else if ((val & $$maskNumericType) == $$valueJavaSupradecimal) { |
|
192 |
// Java supradecimal digit |
|
193 |
value = (ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit) + 10; |
|
194 |
} |
|
195 |
} |
|
196 |
return (value < radix) ? value : -1; |
|
197 |
} |
|
198 |
||
199 |
int getNumericValue(int ch) { |
|
200 |
int val = getProperties(ch); |
|
201 |
int retval = -1; |
|
202 |
||
203 |
switch (val & $$maskNumericType) { |
|
204 |
default: // cannot occur |
|
205 |
case ($$valueNotNumeric): // not numeric |
|
206 |
retval = -1; |
|
207 |
break; |
|
208 |
case ($$valueDigit): // simple numeric |
|
209 |
retval = ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit; |
|
210 |
break; |
|
211 |
case ($$valueStrangeNumeric) : // "strange" numeric |
|
212 |
switch(ch) { |
|
213 |
case 0x10113: retval = 40; break; // AEGEAN NUMBER FORTY |
|
214 |
case 0x10114: retval = 50; break; // AEGEAN NUMBER FIFTY |
|
215 |
case 0x10115: retval = 60; break; // AEGEAN NUMBER SIXTY |
|
216 |
case 0x10116: retval = 70; break; // AEGEAN NUMBER SEVENTY |
|
217 |
case 0x10117: retval = 80; break; // AEGEAN NUMBER EIGHTY |
|
218 |
case 0x10118: retval = 90; break; // AEGEAN NUMBER NINETY |
|
219 |
case 0x10119: retval = 100; break; // AEGEAN NUMBER ONE HUNDRED |
|
220 |
case 0x1011A: retval = 200; break; // AEGEAN NUMBER TWO HUNDRED |
|
221 |
case 0x1011B: retval = 300; break; // AEGEAN NUMBER THREE HUNDRED |
|
222 |
case 0x1011C: retval = 400; break; // AEGEAN NUMBER FOUR HUNDRED |
|
223 |
case 0x1011D: retval = 500; break; // AEGEAN NUMBER FIVE HUNDRED |
|
224 |
case 0x1011E: retval = 600; break; // AEGEAN NUMBER SIX HUNDRED |
|
225 |
case 0x1011F: retval = 700; break; // AEGEAN NUMBER SEVEN HUNDRED |
|
226 |
case 0x10120: retval = 800; break; // AEGEAN NUMBER EIGHT HUNDRED |
|
227 |
case 0x10121: retval = 900; break; // AEGEAN NUMBER NINE HUNDRED |
|
228 |
case 0x10122: retval = 1000; break; // AEGEAN NUMBER ONE THOUSAND |
|
229 |
case 0x10123: retval = 2000; break; // AEGEAN NUMBER TWO THOUSAND |
|
230 |
case 0x10124: retval = 3000; break; // AEGEAN NUMBER THREE THOUSAND |
|
231 |
case 0x10125: retval = 4000; break; // AEGEAN NUMBER FOUR THOUSAND |
|
232 |
case 0x10126: retval = 5000; break; // AEGEAN NUMBER FIVE THOUSAND |
|
233 |
case 0x10127: retval = 6000; break; // AEGEAN NUMBER SIX THOUSAND |
|
234 |
case 0x10128: retval = 7000; break; // AEGEAN NUMBER SEVEN THOUSAND |
|
235 |
case 0x10129: retval = 8000; break; // AEGEAN NUMBER EIGHT THOUSAND |
|
236 |
case 0x1012A: retval = 9000; break; // AEGEAN NUMBER NINE THOUSAND |
|
237 |
case 0x1012B: retval = 10000; break; // AEGEAN NUMBER TEN THOUSAND |
|
238 |
case 0x1012C: retval = 20000; break; // AEGEAN NUMBER TWENTY THOUSAND |
|
239 |
case 0x1012D: retval = 30000; break; // AEGEAN NUMBER THIRTY THOUSAND |
|
240 |
case 0x1012E: retval = 40000; break; // AEGEAN NUMBER FORTY THOUSAND |
|
241 |
case 0x1012F: retval = 50000; break; // AEGEAN NUMBER FIFTY THOUSAND |
|
242 |
case 0x10130: retval = 60000; break; // AEGEAN NUMBER SIXTY THOUSAND |
|
243 |
case 0x10131: retval = 70000; break; // AEGEAN NUMBER SEVENTY THOUSAND |
|
244 |
case 0x10132: retval = 80000; break; // AEGEAN NUMBER EIGHTY THOUSAND |
|
245 |
case 0x10133: retval = 90000; break; // AEGEAN NUMBER NINETY THOUSAND |
|
246 |
case 0x10323: retval = 50; break; // OLD ITALIC NUMERAL FIFTY |
|
2497 | 247 |
|
248 |
case 0x010144: retval = 50; break; // ACROPHONIC ATTIC FIFTY |
|
249 |
case 0x010145: retval = 500; break; // ACROPHONIC ATTIC FIVE HUNDRED |
|
250 |
case 0x010146: retval = 5000; break; // ACROPHONIC ATTIC FIVE THOUSAND |
|
251 |
case 0x010147: retval = 50000; break; // ACROPHONIC ATTIC FIFTY THOUSAND |
|
252 |
case 0x01014A: retval = 50; break; // ACROPHONIC ATTIC FIFTY TALENTS |
|
253 |
case 0x01014B: retval = 100; break; // ACROPHONIC ATTIC ONE HUNDRED TALENTS |
|
254 |
case 0x01014C: retval = 500; break; // ACROPHONIC ATTIC FIVE HUNDRED TALENTS |
|
255 |
case 0x01014D: retval = 1000; break; // ACROPHONIC ATTIC ONE THOUSAND TALENTS |
|
256 |
case 0x01014E: retval = 5000; break; // ACROPHONIC ATTIC FIVE THOUSAND TALENTS |
|
257 |
case 0x010151: retval = 50; break; // ACROPHONIC ATTIC FIFTY STATERS |
|
258 |
case 0x010152: retval = 100; break; // ACROPHONIC ATTIC ONE HUNDRED STATERS |
|
259 |
case 0x010153: retval = 500; break; // ACROPHONIC ATTIC FIVE HUNDRED STATERS |
|
260 |
case 0x010154: retval = 1000; break; // ACROPHONIC ATTIC ONE THOUSAND STATERS |
|
261 |
case 0x010155: retval = 10000; break; // ACROPHONIC ATTIC TEN THOUSAND STATERS |
|
262 |
case 0x010156: retval = 50000; break; // ACROPHONIC ATTIC FIFTY THOUSAND STATERS |
|
263 |
case 0x010166: retval = 50; break; // ACROPHONIC TROEZENIAN FIFTY |
|
264 |
case 0x010167: retval = 50; break; // ACROPHONIC TROEZENIAN FIFTY ALTERNATE FORM |
|
265 |
case 0x010168: retval = 50; break; // ACROPHONIC HERMIONIAN FIFTY |
|
266 |
case 0x010169: retval = 50; break; // ACROPHONIC THESPIAN FIFTY |
|
267 |
case 0x01016A: retval = 100; break; // ACROPHONIC THESPIAN ONE HUNDRED |
|
268 |
case 0x01016B: retval = 300; break; // ACROPHONIC THESPIAN THREE HUNDRED |
|
269 |
case 0x01016C: retval = 500; break; // ACROPHONIC EPIDAUREAN FIVE HUNDRED |
|
270 |
case 0x01016D: retval = 500; break; // ACROPHONIC TROEZENIAN FIVE HUNDRED |
|
271 |
case 0x01016E: retval = 500; break; // ACROPHONIC THESPIAN FIVE HUNDRED |
|
272 |
case 0x01016F: retval = 500; break; // ACROPHONIC CARYSTIAN FIVE HUNDRED |
|
273 |
case 0x010170: retval = 500; break; // ACROPHONIC NAXIAN FIVE HUNDRED |
|
274 |
case 0x010171: retval = 1000; break; // ACROPHONIC THESPIAN ONE THOUSAND |
|
275 |
case 0x010172: retval = 5000; break; // ACROPHONIC THESPIAN FIVE THOUSAND |
|
276 |
case 0x010174: retval = 50; break; // ACROPHONIC STRATIAN FIFTY MNAS |
|
277 |
case 0x010341: retval = 90; break; // GOTHIC LETTER NINETY |
|
278 |
case 0x01034A: retval = 900; break; // GOTHIC LETTER NINE HUNDRED |
|
279 |
case 0x0103D5: retval = 100; break; // OLD PERSIAN NUMBER HUNDRED |
|
7247 | 280 |
case 0x01085D: retval = 100; break; // IMPERIAL ARAMAIC NUMBER ONE HUNDRED |
281 |
case 0x01085E: retval = 1000; break; // IMPERIAL ARAMAIC NUMBER ONE THOUSAND |
|
282 |
case 0x01085F: retval = 10000; break; // IMPERIAL ARAMAIC NUMBER TEN THOUSAND |
|
2497 | 283 |
case 0x010919: retval = 100; break; // PHOENICIAN NUMBER ONE HUNDRED |
284 |
case 0x010A46: retval = 100; break; // KHAROSHTHI NUMBER ONE HUNDRED |
|
285 |
case 0x010A47: retval = 1000; break; // KHAROSHTHI NUMBER ONE THOUSAND |
|
7247 | 286 |
case 0x010A7E: retval = 50; break; // OLD SOUTH ARABIAN NUMBER FIFTY |
287 |
case 0x010B5E: retval = 100; break; // INSCRIPTIONAL PARTHIAN NUMBER ONE HUNDRED |
|
288 |
case 0x010B5F: retval = 1000; break; // INSCRIPTIONAL PARTHIAN NUMBER ONE THOUSAND |
|
289 |
case 0x010B7E: retval = 100; break; // INSCRIPTIONAL PAHLAVI NUMBER ONE HUNDRED |
|
290 |
case 0x010B7F: retval = 1000; break; // INSCRIPTIONAL PAHLAVI NUMBER ONE THOUSAND |
|
291 |
case 0x010E6C: retval = 40; break; // RUMI NUMBER FORTY |
|
292 |
case 0x010E6D: retval = 50; break; // RUMI NUMBER FIFTY |
|
293 |
case 0x010E6E: retval = 60; break; // RUMI NUMBER SIXTY |
|
294 |
case 0x010E6F: retval = 70; break; // RUMI NUMBER SEVENTY |
|
295 |
case 0x010E70: retval = 80; break; // RUMI NUMBER EIGHTY |
|
296 |
case 0x010E71: retval = 90; break; // RUMI NUMBER NINETY |
|
297 |
case 0x010E72: retval = 100; break; // RUMI NUMBER ONE HUNDRED |
|
298 |
case 0x010E73: retval = 200; break; // RUMI NUMBER TWO HUNDRED |
|
299 |
case 0x010E74: retval = 300; break; // RUMI NUMBER THREE HUNDRED |
|
300 |
case 0x010E75: retval = 400; break; // RUMI NUMBER FOUR HUNDRED |
|
301 |
case 0x010E76: retval = 500; break; // RUMI NUMBER FIVE HUNDRED |
|
302 |
case 0x010E77: retval = 600; break; // RUMI NUMBER SIX HUNDRED |
|
303 |
case 0x010E78: retval = 700; break; // RUMI NUMBER SEVEN HUNDRED |
|
304 |
case 0x010E79: retval = 800; break; // RUMI NUMBER EIGHT HUNDRED |
|
305 |
case 0x010E7A: retval = 900; break; // RUMI NUMBER NINE HUNDRED |
|
306 |
case 0x01105E: retval = 40; break; // BRAHMI NUMBER FORTY |
|
307 |
case 0x01105F: retval = 50; break; // BRAHMI NUMBER FIFTY |
|
308 |
case 0x011060: retval = 60; break; // BRAHMI NUMBER SIXTY |
|
309 |
case 0x011061: retval = 70; break; // BRAHMI NUMBER SEVENTY |
|
310 |
case 0x011062: retval = 80; break; // BRAHMI NUMBER EIGHTY |
|
311 |
case 0x011063: retval = 90; break; // BRAHMI NUMBER NINETY |
|
312 |
case 0x011064: retval = 100; break; // BRAHMI NUMBER ONE HUNDRED |
|
313 |
case 0x011065: retval = 1000; break; // BRAHMI NUMBER ONE THOUSAND |
|
14411 | 314 |
case 0x012432: retval = 216000; break; // CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS DISH |
315 |
case 0x012433: retval = 432000; break; // CUNEIFORM NUMERIC SIGN SHAR2 TIMES GAL PLUS MIN |
|
2497 | 316 |
case 0x01D36C: retval = 40; break; // COUNTING ROD TENS DIGIT FOUR |
317 |
case 0x01D36D: retval = 50; break; // COUNTING ROD TENS DIGIT FIVE |
|
318 |
case 0x01D36E: retval = 60; break; // COUNTING ROD TENS DIGIT SIX |
|
319 |
case 0x01D36F: retval = 70; break; // COUNTING ROD TENS DIGIT SEVEN |
|
320 |
case 0x01D370: retval = 80; break; // COUNTING ROD TENS DIGIT EIGHT |
|
321 |
case 0x01D371: retval = 90; break; // COUNTING ROD TENS DIGIT NINE |
|
2 | 322 |
default: retval = -2; break; |
323 |
} |
|
324 |
||
325 |
break; |
|
326 |
case ($$valueJavaSupradecimal): // Java supradecimal |
|
327 |
retval = (ch + ((val & $$maskDigitOffset) >> $$shiftDigitOffset) & $$maskDigit) + 10; |
|
328 |
break; |
|
329 |
} |
|
330 |
return retval; |
|
331 |
} |
|
332 |
||
333 |
boolean isWhitespace(int ch) { |
|
334 |
int props = getProperties(ch); |
|
335 |
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace); |
|
336 |
} |
|
337 |
||
338 |
byte getDirectionality(int ch) { |
|
339 |
int val = getProperties(ch); |
|
340 |
byte directionality = (byte)((val & $$maskBidi) >> $$shiftBidi); |
|
341 |
if (directionality == 0xF ) { |
|
342 |
directionality = Character.DIRECTIONALITY_UNDEFINED; |
|
343 |
} |
|
344 |
return directionality; |
|
345 |
} |
|
346 |
||
347 |
boolean isMirrored(int ch) { |
|
348 |
int props = getProperties(ch); |
|
349 |
return ((props & $$maskMirrored) != 0); |
|
350 |
} |
|
351 |
||
352 |
static final CharacterData instance = new CharacterData01(); |
|
353 |
private CharacterData01() {}; |
|
354 |
||
355 |
$$Tables |
|
356 |
||
357 |
static { |
|
358 |
$$Initializers |
|
359 |
} |
|
360 |
} |