• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GENERATED SOURCE. DO NOT MODIFY. */
2 // © 2016 and later: Unicode, Inc. and others.
3 // License & terms of use: http://www.unicode.org/copyright.html#License
4 /**
5 *******************************************************************************
6 * Copyright (C) 1996-2013, International Business Machines Corporation and
7 * others. All Rights Reserved.
8 *******************************************************************************
9 */
10 
11 package ohos.global.icu.lang;
12 
13 import ohos.global.icu.lang.UCharacterEnums.ECharacterDirection;
14 
15 /**
16  * Enumerated Unicode character linguistic direction constants.
17  * Used as return results from <a href=UCharacter.html>UCharacter</a>
18  * <p>
19  * This class is not subclassable
20  * </p>
21  * @author Syn Wee Quek
22  */
23 
24 public final class UCharacterDirection implements ECharacterDirection {
25 
26     // private constructor =========================================
27     ///CLOVER:OFF
28     /**
29      * Private constructor to prevent initialisation
30      */
UCharacterDirection()31     private UCharacterDirection()
32     {
33     }
34     ///CLOVER:ON
35 
36     /**
37      * Gets the name of the argument direction
38      * @param dir direction type to retrieve name
39      * @return directional name
40      */
toString(int dir)41     public static String toString(int dir) {
42         switch(dir)
43             {
44             case LEFT_TO_RIGHT :
45                 return "Left-to-Right";
46             case RIGHT_TO_LEFT :
47                 return "Right-to-Left";
48             case EUROPEAN_NUMBER :
49                 return "European Number";
50             case EUROPEAN_NUMBER_SEPARATOR :
51                 return "European Number Separator";
52             case EUROPEAN_NUMBER_TERMINATOR :
53                 return "European Number Terminator";
54             case ARABIC_NUMBER :
55                 return "Arabic Number";
56             case COMMON_NUMBER_SEPARATOR :
57                 return "Common Number Separator";
58             case BLOCK_SEPARATOR :
59                 return "Paragraph Separator";
60             case SEGMENT_SEPARATOR :
61                 return "Segment Separator";
62             case WHITE_SPACE_NEUTRAL :
63                 return "Whitespace";
64             case OTHER_NEUTRAL :
65                 return "Other Neutrals";
66             case LEFT_TO_RIGHT_EMBEDDING :
67                 return "Left-to-Right Embedding";
68             case LEFT_TO_RIGHT_OVERRIDE :
69                 return "Left-to-Right Override";
70             case RIGHT_TO_LEFT_ARABIC :
71                 return "Right-to-Left Arabic";
72             case RIGHT_TO_LEFT_EMBEDDING :
73                 return "Right-to-Left Embedding";
74             case RIGHT_TO_LEFT_OVERRIDE :
75                 return "Right-to-Left Override";
76             case POP_DIRECTIONAL_FORMAT :
77                 return "Pop Directional Format";
78             case DIR_NON_SPACING_MARK :
79                 return "Non-Spacing Mark";
80             case BOUNDARY_NEUTRAL :
81                 return "Boundary Neutral";
82             case FIRST_STRONG_ISOLATE:
83                 return "First Strong Isolate";
84             case LEFT_TO_RIGHT_ISOLATE:
85                 return "Left-to-Right Isolate";
86             case RIGHT_TO_LEFT_ISOLATE:
87                 return "Right-to-Left Isolate";
88             case POP_DIRECTIONAL_ISOLATE:
89                 return "Pop Directional Isolate";
90             }
91         return "Unassigned";
92     }
93 }
94