1 /*
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3 *
4 * This code is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License version 2 only, as
6 * published by the Free Software Foundation. Oracle designates this
7 * particular file as subject to the "Classpath" exception as provided
8 * by Oracle in the LICENSE file that accompanied this code.
9 *
10 * This code is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * version 2 for more details (a copy is included in the LICENSE file that
14 * accompanied this code).
15 *
16 * You should have received a copy of the GNU General Public License version
17 * 2 along with this work; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *
20 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
21 * or visit www.oracle.com if you need additional information or have any
22 * questions.
23 */
24 /*
25 /**
26 *******************************************************************************
27 * Copyright (C) 1996-2004, International Business Machines Corporation and *
28 * others. All Rights Reserved. *
29 *******************************************************************************
30 */
31 // CHANGELOG
32 // 2005-05-19 Edward Wang
33 // - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterDirection.java
34 // - move from package com.ibm.icu.lang to package sun.net.idn
35 //
36
37 package sun.net.idn;
38
39 /**
40 * Enumerated Unicode character linguistic direction constants.
41 * Used as return results from <a href=UCharacter.html>UCharacter</a>
42 * <p>
43 * This class is not subclassable
44 * </p>
45 * @author Syn Wee Quek
46 * @stable ICU 2.1
47 */
48
49 @SuppressWarnings("deprecation")
50 final class UCharacterDirection implements UCharacterEnums.ECharacterDirection {
51
52 // private constructor =========================================
53 ///CLOVER:OFF
54 /**
55 * Private constructor to prevent initialisation
56 */
57 private UCharacterDirection()
58 {
59 }
60 ///CLOVER:ON
61
62 /**
63 * Gets the name of the argument direction
64 * @param dir direction type to retrieve name
65 * @return directional name
66 * @stable ICU 2.1
67 */
68 public static String toString(int dir) {
69 switch(dir)
70 {
|
1 /*
2 * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved.
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
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 *
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.
24 */
25 /*
26 /**
27 *******************************************************************************
28 * Copyright (C) 1996-2004, International Business Machines Corporation and *
29 * others. All Rights Reserved. *
30 *******************************************************************************
31 */
32 // CHANGELOG
33 // 2005-05-19 Edward Wang
34 // - copy this file from icu4jsrc_3_2/src/com/ibm/icu/lang/UCharacterDirection.java
35 // - move from package com.ibm.icu.lang to package sun.net.idn
36 //
37
38 package jdk.internal.icu.lang;
39
40 /**
41 * Enumerated Unicode character linguistic direction constants.
42 * Used as return results from <a href=UCharacter.html>UCharacter</a>
43 * <p>
44 * This class is not subclassable
45 * </p>
46 * @author Syn Wee Quek
47 * @stable ICU 2.1
48 */
49
50 @SuppressWarnings("deprecation")
51 public final class UCharacterDirection implements UCharacterEnums.ECharacterDirection {
52
53 // private constructor =========================================
54 ///CLOVER:OFF
55 /**
56 * Private constructor to prevent initialisation
57 */
58 private UCharacterDirection()
59 {
60 }
61 ///CLOVER:ON
62
63 /**
64 * Gets the name of the argument direction
65 * @param dir direction type to retrieve name
66 * @return directional name
67 * @stable ICU 2.1
68 */
69 public static String toString(int dir) {
70 switch(dir)
71 {
|