KickJava   Java API By Example, From Geeks To Geeks.

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


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

7
8 package com.ibm.icu.lang;
9
10 import com.ibm.icu.lang.UCharacterEnums.ECharacterDirection;
11
12 /**
13  * Enumerated Unicode character linguistic direction constants.
14  * Used as return results from <a HREF=UCharacter.html>UCharacter</a>
15  * <p>
16  * This class is not subclassable
17  * </p>
18  * @author Syn Wee Quek
19  * @stable ICU 2.1
20  */

21
22 public final class UCharacterDirection implements ECharacterDirection {
23
24     // private constructor =========================================
25
///CLOVER:OFF
26
/**
27      * Private constructor to prevent initialisation
28      */

29     private UCharacterDirection()
30     {
31     }
32     ///CLOVER:ON
33

34     /**
35      * Gets the name of the argument direction
36      * @param dir direction type to retrieve name
37      * @return directional name
38      * @stable ICU 2.1
39      */

40     public static String JavaDoc toString(int dir) {
41         switch(dir)
42             {
43             case LEFT_TO_RIGHT :
44                 return "Left-to-Right";
45             case RIGHT_TO_LEFT :
46                 return "Right-to-Left";
47             case EUROPEAN_NUMBER :
48                 return "European Number";
49             case EUROPEAN_NUMBER_SEPARATOR :
50                 return "European Number Separator";
51             case EUROPEAN_NUMBER_TERMINATOR :
52                 return "European Number Terminator";
53             case ARABIC_NUMBER :
54                 return "Arabic Number";
55             case COMMON_NUMBER_SEPARATOR :
56                 return "Common Number Separator";
57             case BLOCK_SEPARATOR :
58                 return "Paragraph Separator";
59             case SEGMENT_SEPARATOR :
60                 return "Segment Separator";
61             case WHITE_SPACE_NEUTRAL :
62                 return "Whitespace";
63             case OTHER_NEUTRAL :
64                 return "Other Neutrals";
65             case LEFT_TO_RIGHT_EMBEDDING :
66                 return "Left-to-Right Embedding";
67             case LEFT_TO_RIGHT_OVERRIDE :
68                 return "Left-to-Right Override";
69             case RIGHT_TO_LEFT_ARABIC :
70                 return "Right-to-Left Arabic";
71             case RIGHT_TO_LEFT_EMBEDDING :
72                 return "Right-to-Left Embedding";
73             case RIGHT_TO_LEFT_OVERRIDE :
74                 return "Right-to-Left Override";
75             case POP_DIRECTIONAL_FORMAT :
76                 return "Pop Directional Format";
77             case DIR_NON_SPACING_MARK :
78                 return "Non-Spacing Mark";
79             case BOUNDARY_NEUTRAL :
80                 return "Boundary Neutral";
81             }
82         return "Unassigned";
83     }
84 }
85
Popular Tags