Path: blob/master/src/java.base/share/classes/java/lang/CharacterDataPrivateUse.java
41152 views
/*1* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.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 it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* 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 WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 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 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.lang;2627/** The CharacterData class encapsulates the large tables found in28Java.lang.Character. */2930class CharacterDataPrivateUse extends CharacterData {3132int getProperties(int ch) {33return 0;34}3536int getType(int ch) {37return (ch & 0xFFFE) == 0xFFFE38? Character.UNASSIGNED39: Character.PRIVATE_USE;40}4142boolean isJavaIdentifierStart(int ch) {43return false;44}4546boolean isJavaIdentifierPart(int ch) {47return false;48}4950boolean isUnicodeIdentifierStart(int ch) {51return false;52}5354boolean isUnicodeIdentifierPart(int ch) {55return false;56}5758boolean isIdentifierIgnorable(int ch) {59return false;60}6162int toLowerCase(int ch) {63return ch;64}6566int toUpperCase(int ch) {67return ch;68}6970int toTitleCase(int ch) {71return ch;72}7374int digit(int ch, int radix) {75return -1;76}7778int getNumericValue(int ch) {79return -1;80}8182boolean isDigit(int ch) {83return false;84}8586boolean isLowerCase(int ch) {87return false;88}8990boolean isUpperCase(int ch) {91return false;92}9394boolean isWhitespace(int ch) {95return false;96}9798byte getDirectionality(int ch) {99return (ch & 0xFFFE) == 0xFFFE100? Character.DIRECTIONALITY_UNDEFINED101: Character.DIRECTIONALITY_LEFT_TO_RIGHT;102}103104boolean isMirrored(int ch) {105return false;106}107108static final CharacterData instance = new CharacterDataPrivateUse();109private CharacterDataPrivateUse() {};110}111112113