KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ibm > icu > lang > UCharacterEnums


1 /**
2  *******************************************************************************
3  * Copyright (C) 2004-2006, International Business Machines Corporation and *
4  * others. All Rights Reserved. *
5  *******************************************************************************
6  */

7
8 package com.ibm.icu.lang;
9
10 /**
11  * A container for the different 'enumerated types' used by UCharacter.
12  * @stable ICU 3.0
13  */

14 public class UCharacterEnums {
15
16     /** This is just a namespace, it is not instantiatable. */
17     ///CLOVER:OFF
18
private UCharacterEnums() {}
19
20     /**
21      * 'Enum' for the CharacterCategory constants. These constants are
22      * compatible in name <b>but not in value</b> with those defined in
23      * <code>java.lang.Character</code>.
24      * @see UCharacterCategory
25      * @stable ICU 3.0
26      */

27     public static interface ECharacterCategory {
28         /**
29          * Unassigned character type
30          * @stable ICU 2.1
31          */

32         public static final byte UNASSIGNED = 0;
33
34         /**
35          * Character type Cn
36          * Not Assigned (no characters in [UnicodeData.txt] have this property)
37          * @stable ICU 2.6
38          */

39         public static final byte GENERAL_OTHER_TYPES = 0;
40
41         /**
42          * Character type Lu
43          * @stable ICU 2.1
44          */

45         public static final byte UPPERCASE_LETTER = 1;
46
47         /**
48          * Character type Ll
49          * @stable ICU 2.1
50          */

51         public static final byte LOWERCASE_LETTER = 2;
52
53         /**
54          * Character type Lt
55          * @stable ICU 2.1
56          */

57
58         public static final byte TITLECASE_LETTER = 3;
59
60         /**
61          * Character type Lm
62          * @stable ICU 2.1
63          */

64         public static final byte MODIFIER_LETTER = 4;
65
66         /**
67          * Character type Lo
68          * @stable ICU 2.1
69          */

70         public static final byte OTHER_LETTER = 5;
71
72         /**
73          * Character type Mn
74          * @stable ICU 2.1
75          */

76         public static final byte NON_SPACING_MARK = 6;
77
78         /**
79          * Character type Me
80          * @stable ICU 2.1
81          */

82         public static final byte ENCLOSING_MARK = 7;
83
84         /**
85          * Character type Mc
86          * @stable ICU 2.1
87          */

88         public static final byte COMBINING_SPACING_MARK = 8;
89
90         /**
91          * Character type Nd
92          * @stable ICU 2.1
93          */

94         public static final byte DECIMAL_DIGIT_NUMBER = 9;
95
96         /**
97          * Character type Nl
98          * @stable ICU 2.1
99          */

100         public static final byte LETTER_NUMBER = 10;
101         
102         /**
103          * Character type No
104          * @stable ICU 2.1
105          */

106         public static final byte OTHER_NUMBER = 11;
107
108         /**
109          * Character type Zs
110          * @stable ICU 2.1
111          */

112         public static final byte SPACE_SEPARATOR = 12;
113
114         /**
115          * Character type Zl
116          * @stable ICU 2.1
117          */

118         public static final byte LINE_SEPARATOR = 13;
119
120         /**
121          * Character type Zp
122          * @stable ICU 2.1
123          */

124         public static final byte PARAGRAPH_SEPARATOR = 14;
125
126         /**
127          * Character type Cc
128          * @stable ICU 2.1
129          */

130         public static final byte CONTROL = 15;
131
132         /**
133          * Character type Cf
134          * @stable ICU 2.1
135          */

136         public static final byte FORMAT = 16;
137
138         /**
139          * Character type Co
140          * @stable ICU 2.1
141          */

142         public static final byte PRIVATE_USE = 17;
143
144         /**
145          * Character type Cs
146          * @stable ICU 2.1
147          */

148         public static final byte SURROGATE = 18;
149
150         /**
151          * Character type Pd
152          * @stable ICU 2.1
153          */

154         public static final byte DASH_PUNCTUATION = 19;
155
156         /**
157          * Character type Ps
158          * @stable ICU 2.1
159          */

160         public static final byte START_PUNCTUATION = 20;
161         
162         /**
163          * Character type Pe
164          * @stable ICU 2.1
165          */

166         public static final byte END_PUNCTUATION = 21;
167
168         /**
169          * Character type Pc
170          * @stable ICU 2.1
171          */

172         public static final byte CONNECTOR_PUNCTUATION = 22;
173
174         /**
175          * Character type Po
176          * @stable ICU 2.1
177          */

178         public static final byte OTHER_PUNCTUATION = 23;
179
180         /**
181          * Character type Sm
182          * @stable ICU 2.1
183          */

184         public static final byte MATH_SYMBOL = 24;
185
186         /**
187          * Character type Sc
188          * @stable ICU 2.1
189          */

190         public static final byte CURRENCY_SYMBOL = 25;
191         
192         /**
193          * Character type Sk
194          * @stable ICU 2.1
195          */

196         public static final byte MODIFIER_SYMBOL = 26;
197         
198         /**
199          * Character type So
200          * @stable ICU 2.1
201          */

202         public static final byte OTHER_SYMBOL = 27;
203         
204         /**
205          * Character type Pi
206          * @see #INITIAL_QUOTE_PUNCTUATION
207          * @stable ICU 2.1
208          */

209         public static final byte INITIAL_PUNCTUATION = 28;
210
211         /**
212          * Character type Pi
213          * This name is compatible with java.lang.Character's name for this type.
214          * @see #INITIAL_PUNCTUATION
215          * @stable ICU 2.8
216          */

217         public static final byte INITIAL_QUOTE_PUNCTUATION = 28;
218
219         /**
220          * Character type Pf
221          * @see #FINAL_QUOTE_PUNCTUATION
222          * @stable ICU 2.1
223          */

224         public static final byte FINAL_PUNCTUATION = 29;
225
226         /**
227          * Character type Pf
228          * This name is compatible with java.lang.Character's name for this type.
229          * @see #FINAL_PUNCTUATION
230          * @stable ICU 2.8
231          */

232         public static final byte FINAL_QUOTE_PUNCTUATION = 29;
233         
234         /**
235          * Character type count
236          * @stable ICU 2.1
237          */

238         public static final byte CHAR_CATEGORY_COUNT = 30;
239     }
240
241     /**
242      * 'Enum' for the CharacterDirection constants. There are two sets
243      * of names, those used in ICU, and those used in the JDK. The
244      * JDK constants are compatible in name <b>but not in value</b>
245      * with those defined in <code>java.lang.Character</code>.
246      * @see UCharacterDirection
247      * @stable ICU 3.0
248      */

249     public static interface ECharacterDirection {
250         /**
251          * Directional type L
252          * @stable ICU 2.1
253          */

254         public static final int LEFT_TO_RIGHT = 0;
255
256         /**
257          * JDK-compatible synonym for LEFT_TO_RIGHT.
258          * @stable ICU 3.0
259          */

260         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = (byte)LEFT_TO_RIGHT;
261
262         /**
263          * Directional type R
264          * @stable ICU 2.1
265          */

266         public static final int RIGHT_TO_LEFT = 1;
267
268         /**
269          * JDK-compatible synonym for RIGHT_TO_LEFT.
270          * @stable ICU 3.0
271          */

272         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = (byte)RIGHT_TO_LEFT;
273
274         /**
275          * Directional type EN
276          * @stable ICU 2.1
277          */

278         public static final int EUROPEAN_NUMBER = 2;
279
280         /**
281          * JDK-compatible synonym for EUROPEAN_NUMBER.
282          * @stable ICU 3.0
283          */

284         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = (byte)EUROPEAN_NUMBER;
285
286         /**
287          * Directional type ES
288          * @stable ICU 2.1
289          */

290         public static final int EUROPEAN_NUMBER_SEPARATOR = 3;
291
292         /**
293          * JDK-compatible synonym for EUROPEAN_NUMBER_SEPARATOR.
294          * @stable ICU 3.0
295          */

296         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = (byte)EUROPEAN_NUMBER_SEPARATOR;
297
298         /**
299          * Directional type ET
300          * @stable ICU 2.1
301          */

302         public static final int EUROPEAN_NUMBER_TERMINATOR = 4;
303
304         /**
305          * JDK-compatible synonym for EUROPEAN_NUMBER_TERMINATOR.
306          * @stable ICU 3.0
307          */

308         public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = (byte)EUROPEAN_NUMBER_TERMINATOR;
309
310         /**
311          * Directional type AN
312          * @stable ICU 2.1
313          */

314         public static final int ARABIC_NUMBER = 5;
315
316         /**
317          * JDK-compatible synonym for ARABIC_NUMBER.
318          * @stable ICU 3.0
319          */

320         public static final byte DIRECTIONALITY_ARABIC_NUMBER = (byte)ARABIC_NUMBER;
321
322         /**
323          * Directional type CS
324          * @stable ICU 2.1
325          */

326         public static final int COMMON_NUMBER_SEPARATOR = 6;
327
328         /**
329          * JDK-compatible synonym for COMMON_NUMBER_SEPARATOR.
330          * @stable ICU 3.0
331          */

332         public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = (byte)COMMON_NUMBER_SEPARATOR;
333
334         /**
335          * Directional type B
336          * @stable ICU 2.1
337          */

338         public static final int BLOCK_SEPARATOR = 7;
339
340         /**
341          * JDK-compatible synonym for BLOCK_SEPARATOR.
342          * @stable ICU 3.0
343          */

344         public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = (byte)BLOCK_SEPARATOR;
345
346         /**
347          * Directional type S
348          * @stable ICU 2.1
349          */

350         public static final int SEGMENT_SEPARATOR = 8;
351
352         /**
353          * JDK-compatible synonym for SEGMENT_SEPARATOR.
354          * @stable ICU 3.0
355          */

356         public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = (byte)SEGMENT_SEPARATOR;
357
358         /**
359          * Directional type WS
360          * @stable ICU 2.1
361          */

362         public static final int WHITE_SPACE_NEUTRAL = 9;
363
364         /**
365          * JDK-compatible synonym for WHITE_SPACE_NEUTRAL.
366          * @stable ICU 3.0
367          */

368         public static final byte DIRECTIONALITY_WHITESPACE = (byte)WHITE_SPACE_NEUTRAL;
369
370         /**
371          * Directional type ON
372          * @stable ICU 2.1
373          */

374         public static final int OTHER_NEUTRAL = 10;
375
376         /**
377          * JDK-compatible synonym for OTHER_NEUTRAL.
378          * @stable ICU 3.0
379          */

380         public static final byte DIRECTIONALITY_OTHER_NEUTRALS = (byte)OTHER_NEUTRAL;
381
382         /**
383          * Directional type LRE
384          * @stable ICU 2.1
385          */

386         public static final int LEFT_TO_RIGHT_EMBEDDING = 11;
387
388         /**
389          * JDK-compatible synonym for LEFT_TO_RIGHT_EMBEDDING.
390          * @stable ICU 3.0
391          */

392         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = (byte)LEFT_TO_RIGHT_EMBEDDING;
393
394         /**
395          * Directional type LRO
396          * @stable ICU 2.1
397          */

398         public static final int LEFT_TO_RIGHT_OVERRIDE = 12;
399
400         /**
401          * JDK-compatible synonym for LEFT_TO_RIGHT_OVERRIDE.
402          * @stable ICU 3.0
403          */

404         public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = (byte)LEFT_TO_RIGHT_OVERRIDE;
405
406         /**
407          * Directional type AL
408          * @stable ICU 2.1
409          */

410         public static final int RIGHT_TO_LEFT_ARABIC = 13;
411
412         /**
413          * JDK-compatible synonym for RIGHT_TO_LEFT_ARABIC.
414          * @stable ICU 3.0
415          */

416         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = (byte)RIGHT_TO_LEFT_ARABIC;
417
418         /**
419          * Directional type RLE
420          * @stable ICU 2.1
421          */

422         public static final int RIGHT_TO_LEFT_EMBEDDING = 14;
423
424         /**
425          * JDK-compatible synonym for RIGHT_TO_LEFT_EMBEDDING.
426          * @stable ICU 3.0
427          */

428         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = (byte)RIGHT_TO_LEFT_EMBEDDING;
429
430         /**
431          * Directional type RLO
432          * @stable ICU 2.1
433          */

434         public static final int RIGHT_TO_LEFT_OVERRIDE = 15;
435
436         /**
437          * JDK-compatible synonym for RIGHT_TO_LEFT_OVERRIDE.
438          * @stable ICU 3.0
439          */

440         public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = (byte)RIGHT_TO_LEFT_OVERRIDE;
441
442         /**
443          * Directional type PDF
444          * @stable ICU 2.1
445          */

446         public static final int POP_DIRECTIONAL_FORMAT = 16;
447
448         /**
449          * JDK-compatible synonym for POP_DIRECTIONAL_FORMAT.
450          * @stable ICU 3.0
451          */

452         public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = (byte)POP_DIRECTIONAL_FORMAT;
453
454         /**
455          * Directional type NSM
456          * @stable ICU 2.1
457          */

458         public static final int DIR_NON_SPACING_MARK = 17;
459
460         /**
461          * JDK-compatible synonym for DIR_NON_SPACING_MARK.
462          * @stable ICU 3.0
463          */

464         public static final byte DIRECTIONALITY_NONSPACING_MARK = (byte)DIR_NON_SPACING_MARK;
465
466         /**
467          * Directional type BN
468          * @stable ICU 2.1
469          */

470         public static final int BOUNDARY_NEUTRAL = 18;
471
472         /**
473          * JDK-compatible synonym for BOUNDARY_NEUTRAL.
474          * @stable ICU 3.0
475          */

476         public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = (byte)BOUNDARY_NEUTRAL;
477
478         /**
479          * Number of directional types
480          * @stable ICU 2.1
481          */

482         public static final int CHAR_DIRECTION_COUNT = 19;
483
484         /**
485          * Undefined bidirectional character type. Undefined <code>char</code>
486          * values have undefined directionality in the Unicode specification.
487          * @stable ICU 3.0
488          */

489         public static final byte DIRECTIONALITY_UNDEFINED = -1;
490     }
491 }
492
Popular Tags