changeset 48740 | 7d5826282e8d |
parent 48684 | 29c1fede33a6 |
child 52979 | 7384e00d5860 |
48739:59bba47f435e | 48740:7d5826282e8d |
---|---|
1 /* |
1 /* |
2 * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package java.lang; |
26 package java.lang; |
27 |
|
28 import java.util.Arrays; |
|
29 |
27 |
30 /** The CharacterData class encapsulates the large tables found in |
28 /** The CharacterData class encapsulates the large tables found in |
31 Java.lang.Character. */ |
29 Java.lang.Character. */ |
32 |
30 |
33 class CharacterDataLatin1 extends CharacterData { |
31 class CharacterDataLatin1 extends CharacterData { |
188 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
186 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
189 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; |
187 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; |
190 |
188 |
191 int digit(int ch, int radix) { |
189 int digit(int ch, int radix) { |
192 int value = DIGITS[ch]; |
190 int value = DIGITS[ch]; |
193 if (value >= 0 && radix >= Character.MIN_RADIX && radix <= Character.MAX_RADIX) { |
191 return (value >= 0 && value < radix && radix >= Character.MIN_RADIX |
194 value = (value < radix) ? value : -1; |
192 && radix <= Character.MAX_RADIX) ? value : -1; |
195 } |
|
196 return value; |
|
197 } |
193 } |
198 |
194 |
199 int getNumericValue(int ch) { |
195 int getNumericValue(int ch) { |
200 int val = getProperties(ch); |
196 int val = getProperties(ch); |
201 int retval = -1; |
197 int retval = -1; |