All Downloads are FREE. Search and download functionalities are using the official Maven repository.

java.lang.Character Maven / Gradle / Ivy

/*

This is not an official specification document, and usage is restricted.

NOTICE


(c) 2005-2007 Sun Microsystems, Inc. All Rights Reserved.

Neither this file nor any files generated from it describe a complete specification, and they may only be used as described below. For example, no permission is given for you to incorporate this file, in whole or in part, in an implementation of a Java specification.

Sun Microsystems Inc. owns the copyright in this file and it is provided to you for informative, as opposed to normative, use. The file and any files generated from it may be used to generate other informative documentation, such as a unified set of documents of API signatures for a platform that includes technologies expressed as Java APIs. The file may also be used to produce "compilation stubs," which allow applications to be compiled and validated for such platforms.

Any work generated from this file, such as unified javadocs or compiled stub files, must be accompanied by this notice in its entirety.

This work corresponds to the API signatures of JSR 219: Foundation Profile 1.1. In the event of a discrepency between this work and the JSR 219 specification, which is available at http://www.jcp.org/en/jsr/detail?id=219, the latter takes precedence. */ package java.lang; /** * The Character class wraps a value of the primitive * type char in an object. An object of type * Character contains a single field whose type is * char. *

* In addition, this class provides several methods for determining * a character's category (lowercase letter, digit, etc.) and for converting * characters from uppercase to lowercase and vice versa. *

* Character information is based on the Unicode Standard, version 3.0. *

* The methods and data of class Character are defined by * the information in the UnicodeData file that is part of the * Unicode Character Database maintained by the Unicode * Consortium. This file specifies various properties including name * and general category for every defined Unicode code point or * character range. *

* The file and its description are available from the Unicode Consortium at: * *

* * @author Lee Boynton * @author Guy Steele * @author Akira Tanaka * @since 1.0 */ public final class Character implements java.io.Serializable, java.lang.Comparable { /** * The minimum radix available for conversion to and from strings. * The constant value of this field is the smallest value permitted * for the radix argument in radix-conversion methods such as the * digit method, the forDigit * method, and the toString method of class * Integer. * * @see java.lang.Character#digit(char, int) * @see java.lang.Character#forDigit(int, int) * @see java.lang.Integer#toString(int, int) * @see java.lang.Integer#valueOf(java.lang.String) */ public static final int MIN_RADIX = 2; /** * The maximum radix available for conversion to and from strings. * The constant value of this field is the largest value permitted * for the radix argument in radix-conversion methods such as the * digit method, the forDigit * method, and the toString method of class * Integer. * * @see java.lang.Character#digit(char, int) * @see java.lang.Character#forDigit(int, int) * @see java.lang.Integer#toString(int, int) * @see java.lang.Integer#valueOf(java.lang.String) */ public static final int MAX_RADIX = 36; /** * The constant value of this field is the smallest value of type * char, '\u0000'. * * @since 1.0.2 */ public static final char MIN_VALUE = 0; /** * The constant value of this field is the largest value of type * char, '\uFFFF'. * * @since 1.0.2 */ public static final char MAX_VALUE = 65535; /** * The Class instance representing the primitive type * char. * * @since 1.1 */ public static final java.lang.Class TYPE = null; /** * General category "Cn" in the Unicode specification. * @since 1.1 */ public static final byte UNASSIGNED = 0; /** * General category "Lu" in the Unicode specification. * @since 1.1 */ public static final byte UPPERCASE_LETTER = 1; /** * General category "Ll" in the Unicode specification. * @since 1.1 */ public static final byte LOWERCASE_LETTER = 2; /** * General category "Lt" in the Unicode specification. * @since 1.1 */ public static final byte TITLECASE_LETTER = 3; /** * General category "Lm" in the Unicode specification. * @since 1.1 */ public static final byte MODIFIER_LETTER = 4; /** * General category "Lo" in the Unicode specification. * @since 1.1 */ public static final byte OTHER_LETTER = 5; /** * General category "Mn" in the Unicode specification. * @since 1.1 */ public static final byte NON_SPACING_MARK = 6; /** * General category "Me" in the Unicode specification. * @since 1.1 */ public static final byte ENCLOSING_MARK = 7; /** * General category "Mc" in the Unicode specification. * @since 1.1 */ public static final byte COMBINING_SPACING_MARK = 8; /** * General category "Nd" in the Unicode specification. * @since 1.1 */ public static final byte DECIMAL_DIGIT_NUMBER = 9; /** * General category "Nl" in the Unicode specification. * @since 1.1 */ public static final byte LETTER_NUMBER = 10; /** * General category "No" in the Unicode specification. * @since 1.1 */ public static final byte OTHER_NUMBER = 11; /** * General category "Zs" in the Unicode specification. * @since 1.1 */ public static final byte SPACE_SEPARATOR = 12; /** * General category "Zl" in the Unicode specification. * @since 1.1 */ public static final byte LINE_SEPARATOR = 13; /** * General category "Zp" in the Unicode specification. * @since 1.1 */ public static final byte PARAGRAPH_SEPARATOR = 14; /** * General category "Cc" in the Unicode specification. * @since 1.1 */ public static final byte CONTROL = 15; /** * General category "Cf" in the Unicode specification. * @since 1.1 */ public static final byte FORMAT = 16; /** * General category "Co" in the Unicode specification. * @since 1.1 */ public static final byte PRIVATE_USE = 18; /** * General category "Cs" in the Unicode specification. * @since 1.1 */ public static final byte SURROGATE = 19; /** * General category "Pd" in the Unicode specification. * @since 1.1 */ public static final byte DASH_PUNCTUATION = 20; /** * General category "Ps" in the Unicode specification. * @since 1.1 */ public static final byte START_PUNCTUATION = 21; /** * General category "Pe" in the Unicode specification. * @since 1.1 */ public static final byte END_PUNCTUATION = 22; /** * General category "Pc" in the Unicode specification. * @since 1.1 */ public static final byte CONNECTOR_PUNCTUATION = 23; /** * General category "Po" in the Unicode specification. * @since 1.1 */ public static final byte OTHER_PUNCTUATION = 24; /** * General category "Sm" in the Unicode specification. * @since 1.1 */ public static final byte MATH_SYMBOL = 25; /** * General category "Sc" in the Unicode specification. * @since 1.1 */ public static final byte CURRENCY_SYMBOL = 26; /** * General category "Sk" in the Unicode specification. * @since 1.1 */ public static final byte MODIFIER_SYMBOL = 27; /** * General category "So" in the Unicode specification. * @since 1.1 */ public static final byte OTHER_SYMBOL = 28; /** * General category "Pi" in the Unicode specification. * @since 1.4 */ public static final byte INITIAL_QUOTE_PUNCTUATION = 29; /** * General category "Pf" in the Unicode specification. * @since 1.4 */ public static final byte FINAL_QUOTE_PUNCTUATION = 30; /** * Undefined bidirectional character type. Undefined char * values have undefined directionality in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_UNDEFINED = -1; /** * Strong bidirectional character type "L" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_LEFT_TO_RIGHT = 0; /** * Strong bidirectional character type "R" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_RIGHT_TO_LEFT = 1; /** * Strong bidirectional character type "AL" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = 2; /** * Weak bidirectional character type "EN" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_EUROPEAN_NUMBER = 3; /** * Weak bidirectional character type "ES" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = 4; /** * Weak bidirectional character type "ET" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = 5; /** * Weak bidirectional character type "AN" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_ARABIC_NUMBER = 6; /** * Weak bidirectional character type "CS" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = 7; /** * Weak bidirectional character type "NSM" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_NONSPACING_MARK = 8; /** * Weak bidirectional character type "BN" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL = 9; /** * Neutral bidirectional character type "B" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = 10; /** * Neutral bidirectional character type "S" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR = 11; /** * Neutral bidirectional character type "WS" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_WHITESPACE = 12; /** * Neutral bidirectional character type "ON" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_OTHER_NEUTRALS = 13; /** * Strong bidirectional character type "LRE" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = 14; /** * Strong bidirectional character type "LRO" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = 15; /** * Strong bidirectional character type "RLE" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = 16; /** * Strong bidirectional character type "RLO" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = 17; /** * Weak bidirectional character type "PDF" in the Unicode specification. * @since 1.4 */ public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = 18; /** * The value of the Character. * * @serial */ private char value; /** use serialVersionUID from JDK 1.0.2 for interoperability */ private static final long serialVersionUID = 3786198910865385080L; /** * Constructs a newly allocated Character object that * represents the specified char value. * * @param value the value to be represented by the * Character object. */ public Character(char value) { } /** * Returns the value of this Character object. * @return the primitive char value represented by * this object. */ public char charValue() { return ' '; } /** * Returns a hash code for this Character. * @return a hash code value for this object. */ public int hashCode() { return 0; } /** * Compares this object against the specified object. * The result is true if and only if the argument is not * null and is a Character object that * represents the same char value as this object. * * @param obj the object to compare with. * @return true if the objects are the same; * false otherwise. */ public boolean equals(java.lang.Object obj) { return false; } /** * Returns a String object representing this * Character's value. The result is a string of * length 1 whose sole component is the primitive * char value represented by this * Character object. * * @return a string representation of this object. */ public java.lang.String toString() { return null; } /** * Returns a String object representing the * specified char. The result is a string of length * 1 consisting solely of the specified char. * * @param c the char to be converted * @return the string representation of the specified char * @since 1.4 */ public static java.lang.String toString(char c) { return null; } /** * Determines if the specified character is a lowercase character. *

* A character is lowercase if its general category type, provided * by Character.getType(ch), is * LOWERCASE_LETTER. *

* The following are examples of lowercase characters: *

     * a b c d e f g h i j k l m n o p q r s t u v w x y z
     * '\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6' 
     * '\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
     * '\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
     * '\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
     * 
*

Many other Unicode characters are lowercase too. *

* * @param ch the character to be tested. * @return true if the character is lowercase; * false otherwise. * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isTitleCase(char) * @see java.lang.Character#toLowerCase(char) * @see java.lang.Character#getType(char) */ public static boolean isLowerCase(char ch) { return false; } /** * Determines if the specified character is an uppercase character. *

* A character is uppercase if its general category type, provided by * Character.getType(ch), is UPPERCASE_LETTER. *

* The following are examples of uppercase characters: *

     * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
     * '\u00C0' '\u00C1' '\u00C2' '\u00C3' '\u00C4' '\u00C5' '\u00C6' '\u00C7'
     * '\u00C8' '\u00C9' '\u00CA' '\u00CB' '\u00CC' '\u00CD' '\u00CE' '\u00CF'
     * '\u00D0' '\u00D1' '\u00D2' '\u00D3' '\u00D4' '\u00D5' '\u00D6' '\u00D8'
     * '\u00D9' '\u00DA' '\u00DB' '\u00DC' '\u00DD' '\u00DE'
     * 
*

Many other Unicode characters are uppercase too.

* * @param ch the character to be tested. * @return true if the character is uppercase; * false otherwise. * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isTitleCase(char) * @see java.lang.Character#toUpperCase(char) * @see java.lang.Character#getType(char) * @since 1.0 */ public static boolean isUpperCase(char ch) { return false; } /** * Determines if the specified character is a titlecase character. *

* A character is a titlecase character if its general * category type, provided by Character.getType(ch), * is TITLECASE_LETTER. *

* Some characters look like pairs of Latin letters. For example, there * is an uppercase letter that looks like "LJ" and has a corresponding * lowercase letter that looks like "lj". A third form, which looks like "Lj", * is the appropriate form to use when rendering a word in lowercase * with initial capitals, as for a book title. *

* These are some of the Unicode characters for which this method returns * true: *

    *
  • LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON *
  • LATIN CAPITAL LETTER L WITH SMALL LETTER J *
  • LATIN CAPITAL LETTER N WITH SMALL LETTER J *
  • LATIN CAPITAL LETTER D WITH SMALL LETTER Z *
*

Many other Unicode characters are titlecase too.

* * @param ch the character to be tested. * @return true if the character is titlecase; * false otherwise. * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isUpperCase(char) * @see java.lang.Character#toTitleCase(char) * @see java.lang.Character#getType(char) * @since 1.0.2 */ public static boolean isTitleCase(char ch) { return false; } /** * Determines if the specified character is a digit. *

* A character is a digit if its general category type, provided * by Character.getType(ch), is * DECIMAL_DIGIT_NUMBER. *

* Some Unicode character ranges that contain digits: *

    *
  • '\u0030' through '\u0039', * ISO-LATIN-1 digits ('0' through '9') *
  • '\u0660' through '\u0669', * Arabic-Indic digits *
  • '\u06F0' through '\u06F9', * Extended Arabic-Indic digits *
  • '\u0966' through '\u096F', * Devanagari digits *
  • '\uFF10' through '\uFF19', * Fullwidth digits *
* * Many other character ranges contain digits as well. * * @param ch the character to be tested. * @return true if the character is a digit; * false otherwise. * @see java.lang.Character#digit(char, int) * @see java.lang.Character#forDigit(int, int) * @see java.lang.Character#getType(char) */ public static boolean isDigit(char ch) { return false; } /** * Determines if a character is defined in Unicode. *

* A character is defined if at least one of the following is true: *

    *
  • It has an entry in the UnicodeData file. *
  • It has a value in a range defined by the UnicodeData file. *
* * @param ch the character to be tested * @return true if the character has a defined meaning * in Unicode; false otherwise. * @see java.lang.Character#isDigit(char) * @see java.lang.Character#isLetter(char) * @see java.lang.Character#isLetterOrDigit(char) * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isTitleCase(char) * @see java.lang.Character#isUpperCase(char) * @since 1.0.2 */ public static boolean isDefined(char ch) { return false; } /** * Determines if the specified character is a letter. *

* A character is considered to be a letter if its general * category type, provided by Character.getType(ch), * is any of the following: *

    *
  • UPPERCASE_LETTER *
  • LOWERCASE_LETTER *
  • TITLECASE_LETTER *
  • MODIFIER_LETTER *
  • OTHER_LETTER *
* * Not all letters have case. Many characters are * letters but are neither uppercase nor lowercase nor titlecase. * * @param ch the character to be tested. * @return true if the character is a letter; * false otherwise. * @see java.lang.Character#isDigit(char) * @see java.lang.Character#isJavaIdentifierStart(char) * @see java.lang.Character#isJavaLetter(char) * @see java.lang.Character#isJavaLetterOrDigit(char) * @see java.lang.Character#isLetterOrDigit(char) * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isTitleCase(char) * @see java.lang.Character#isUnicodeIdentifierStart(char) * @see java.lang.Character#isUpperCase(char) */ public static boolean isLetter(char ch) { return false; } /** * Determines if the specified character is a letter or digit. *

* A character is considered to be a letter or digit if either * Character.isLetter(char ch) or * Character.isDigit(char ch) returns * true for the character. * * @param ch the character to be tested. * @return true if the character is a letter or digit; * false otherwise. * @see java.lang.Character#isDigit(char) * @see java.lang.Character#isJavaIdentifierPart(char) * @see java.lang.Character#isJavaLetter(char) * @see java.lang.Character#isJavaLetterOrDigit(char) * @see java.lang.Character#isLetter(char) * @see java.lang.Character#isUnicodeIdentifierPart(char) * @since 1.0.2 */ public static boolean isLetterOrDigit(char ch) { return false; } /** * Determines if the specified character is * permissible as the first character in a Java identifier. *

* A character may start a Java identifier if and only if * one of the following conditions is true: *

    *
  • {@link #isLetter(char) isLetter(ch)} returns true *
  • {@link #getType(char) getType(ch)} returns LETTER_NUMBER *
  • ch is a currency symbol (such as "$") *
  • ch is a connecting punctuation character (such as "_"). *
* * @param ch the character to be tested. * @return true if the character may start a Java identifier; * false otherwise. * @see java.lang.Character#isJavaIdentifierPart(char) * @see java.lang.Character#isLetter(char) * @see java.lang.Character#isUnicodeIdentifierStart(char) * @since 1.1 */ public static boolean isJavaIdentifierStart(char ch) { return false; } /** * Determines if the specified character may be part of a Java * identifier as other than the first character. *

* A character may be part of a Java identifier if any of the following * are true: *

    *
  • it is a letter *
  • it is a currency symbol (such as '$') *
  • it is a connecting punctuation character (such as '_') *
  • it is a digit *
  • it is a numeric letter (such as a Roman numeral character) *
  • it is a combining mark *
  • it is a non-spacing mark *
  • isIdentifierIgnorable returns * true for the character *
* * @param ch the character to be tested. * @return true if the character may be part of a * Java identifier; false otherwise. * @see java.lang.Character#isIdentifierIgnorable(char) * @see java.lang.Character#isJavaIdentifierStart(char) * @see java.lang.Character#isLetterOrDigit(char) * @see java.lang.Character#isUnicodeIdentifierPart(char) * @since 1.1 */ public static boolean isJavaIdentifierPart(char ch) { return false; } /** * Determines if the specified character is permissible as the * first character in a Unicode identifier. *

* A character may start a Unicode identifier if and only if * one of the following conditions is true: *

    *
  • {@link #isLetter(char) isLetter(ch)} returns true *
  • {@link #getType(char) getType(ch)} returns * LETTER_NUMBER. *
* @param ch the character to be tested. * @return true if the character may start a Unicode * identifier; false otherwise. * @see java.lang.Character#isJavaIdentifierStart(char) * @see java.lang.Character#isLetter(char) * @see java.lang.Character#isUnicodeIdentifierPart(char) * @since 1.1 */ public static boolean isUnicodeIdentifierStart(char ch) { return false; } /** * Determines if the specified character may be part of a Unicode * identifier as other than the first character. *

* A character may be part of a Unicode identifier if and only if * one of the following statements is true: *

    *
  • it is a letter *
  • it is a connecting punctuation character (such as '_') *
  • it is a digit *
  • it is a numeric letter (such as a Roman numeral character) *
  • it is a combining mark *
  • it is a non-spacing mark *
  • isIdentifierIgnorable returns * true for this character. *
* * @param ch the character to be tested. * @return true if the character may be part of a * Unicode identifier; false otherwise. * @see java.lang.Character#isIdentifierIgnorable(char) * @see java.lang.Character#isJavaIdentifierPart(char) * @see java.lang.Character#isLetterOrDigit(char) * @see java.lang.Character#isUnicodeIdentifierStart(char) * @since 1.1 */ public static boolean isUnicodeIdentifierPart(char ch) { return false; } /** * Determines if the specified character should be regarded as * an ignorable character in a Java identifier or a Unicode identifier. *

* The following Unicode characters are ignorable in a Java identifier * or a Unicode identifier: *

    *
  • ISO control characters that are not whitespace *
      *
    • '\u0000' through '\u0008' *
    • '\u000E' through '\u001B' *
    • '\u007F' through '\u009F' *
    * *
  • all characters that have the FORMAT general * category value *
* * @param ch the character to be tested. * @return true if the character is an ignorable control * character that may be part of a Java or Unicode identifier; * false otherwise. * @see java.lang.Character#isJavaIdentifierPart(char) * @see java.lang.Character#isUnicodeIdentifierPart(char) * @since 1.1 */ public static boolean isIdentifierIgnorable(char ch) { return false; } /** * Converts the character argument to lowercase using case * mapping information from the UnicodeData file. *

* Note that * Character.isLowerCase(Character.toLowerCase(ch)) * does not always return true for some ranges of * characters, particularly those that are symbols or ideographs. * * @param ch the character to be converted. * @return the lowercase equivalent of the character, if any; * otherwise, the character itself. * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isUpperCase(char) * @see java.lang.Character#toTitleCase(char) * @see java.lang.Character#toUpperCase(char) */ public static char toLowerCase(char ch) { return ' '; } /** * Converts the character argument to uppercase using case mapping * information from the UnicodeData file. *

* Note that * Character.isUpperCase(Character.toUpperCase(ch)) * does not always return true for some ranges of * characters, particularly those that are symbols or ideographs. * * @param ch the character to be converted. * @return the uppercase equivalent of the character, if any; * otherwise, the character itself. * @see java.lang.Character#isLowerCase(char) * @see java.lang.Character#isUpperCase(char) * @see java.lang.Character#toLowerCase(char) * @see java.lang.Character#toTitleCase(char) */ public static char toUpperCase(char ch) { return ' '; } /** * Converts the character argument to titlecase using case mapping * information from the UnicodeData file. If a character has no * explicit titlecase mapping and is not itself a titlecase char * according to UnicodeData, then the uppercase mapping is * returned as an equivalent titlecase mapping. If the * char argument is already a titlecase * char, the same char value will be * returned. *

* Note that * Character.isTitleCase(Character.toTitleCase(ch)) * does not always return true for some ranges of * characters. * * @param ch the character to be converted. * @return the titlecase equivalent of the character, if any; * otherwise, the character itself. * @see java.lang.Character#isTitleCase(char) * @see java.lang.Character#toLowerCase(char) * @see java.lang.Character#toUpperCase(char) * @since 1.0.2 */ public static char toTitleCase(char ch) { return ' '; } /** * Returns the numeric value of the character ch in the * specified radix. *

* If the radix is not in the range MIN_RADIX <= * radix <= MAX_RADIX or if the * value of ch is not a valid digit in the specified * radix, -1 is returned. A character is a valid digit * if at least one of the following is true: *

    *
  • The method isDigit is true of the character * and the Unicode decimal digit value of the character (or its * single-character decomposition) is less than the specified radix. * In this case the decimal digit value is returned. *
  • The character is one of the uppercase Latin letters * 'A' through 'Z' and its code is less than * radix + 'A' - 10. * In this case, ch - 'A' + 10 * is returned. *
  • The character is one of the lowercase Latin letters * 'a' through 'z' and its code is less than * radix + 'a' - 10. * In this case, ch - 'a' + 10 * is returned. *
* * @param ch the character to be converted. * @param radix the radix. * @return the numeric value represented by the character in the * specified radix. * @see java.lang.Character#forDigit(int, int) * @see java.lang.Character#isDigit(char) */ public static int digit(char ch, int radix) { return 0; } /** * Returns the int value that the specified Unicode * character represents. For example, the character * '\u216C' (the roman numeral fifty) will return * an int with a value of 50. *

* The letters A-Z in their uppercase ('\u0041' through * '\u005A'), lowercase * ('\u0061' through '\u007A'), and * full width variant ('\uFF21' through * '\uFF3A' and '\uFF41' through * '\uFF5A') forms have numeric values from 10 * through 35. This is independent of the Unicode specification, * which does not assign numeric values to these char * values. *

* If the character does not have a numeric value, then -1 is returned. * If the character has a numeric value that cannot be represented as a * nonnegative integer (for example, a fractional value), then -2 * is returned. * * @param ch the character to be converted. * @return the numeric value of the character, as a nonnegative int * value; -2 if the character has a numeric value that is not a * nonnegative integer; -1 if the character has no numeric value. * @see java.lang.Character#forDigit(int, int) * @see java.lang.Character#isDigit(char) * @since 1.1 */ public static int getNumericValue(char ch) { return 0; } /** * Determines if the specified character is a Unicode space character. * A character is considered to be a space character if and only if * it is specified to be a space character by the Unicode standard. This * method returns true if the character's general category type is any of * the following: *

    *
  • SPACE_SEPARATOR *
  • LINE_SEPARATOR *
  • PARAGRAPH_SEPARATOR *
* * @param ch the character to be tested. * @return true if the character is a space character; * false otherwise. * @see java.lang.Character#isWhitespace(char) * @since 1.1 */ public static boolean isSpaceChar(char ch) { return false; } /** * Determines if the specified character is white space according to Java. * A character is a Java whitespace character if and only if it satisfies * one of the following criteria: *
    *
  • It is a Unicode space character (SPACE_SEPARATOR, * LINE_SEPARATOR, or PARAGRAPH_SEPARATOR) * but is not also a non-breaking space ('\u00A0', * '\u2007', '\u202F'). *
  • It is '\u0009', HORIZONTAL TABULATION. *
  • It is '\u000A', LINE FEED. *
  • It is '\u000B', VERTICAL TABULATION. *
  • It is '\u000C', FORM FEED. *
  • It is '\u000D', CARRIAGE RETURN. *
  • It is '\u001C', FILE SEPARATOR. *
  • It is '\u001D', GROUP SEPARATOR. *
  • It is '\u001E', RECORD SEPARATOR. *
  • It is '\u001F', UNIT SEPARATOR. *
* * @param ch the character to be tested. * @return true if the character is a Java whitespace * character; false otherwise. * @see java.lang.Character#isSpaceChar(char) * @since 1.1 */ public static boolean isWhitespace(char ch) { return false; } /** * Determines if the specified character is an ISO control * character. A character is considered to be an ISO control * character if its code is in the range '\u0000' * through '\u001F' or in the range * '\u007F' through '\u009F'. * * @param ch the character to be tested. * @return true if the character is an ISO control character; * false otherwise. * * @see java.lang.Character#isSpaceChar(char) * @see java.lang.Character#isWhitespace(char) * @since 1.1 */ public static boolean isISOControl(char ch) { return false; } /** * Returns a value indicating a character's general category. * * @param ch the character to be tested. * @return a value of type int representing the * character's general category. * @see java.lang.Character#COMBINING_SPACING_MARK * @see java.lang.Character#CONNECTOR_PUNCTUATION * @see java.lang.Character#CONTROL * @see java.lang.Character#CURRENCY_SYMBOL * @see java.lang.Character#DASH_PUNCTUATION * @see java.lang.Character#DECIMAL_DIGIT_NUMBER * @see java.lang.Character#ENCLOSING_MARK * @see java.lang.Character#END_PUNCTUATION * @see java.lang.Character#FINAL_QUOTE_PUNCTUATION * @see java.lang.Character#FORMAT * @see java.lang.Character#INITIAL_QUOTE_PUNCTUATION * @see java.lang.Character#LETTER_NUMBER * @see java.lang.Character#LINE_SEPARATOR * @see java.lang.Character#LOWERCASE_LETTER * @see java.lang.Character#MATH_SYMBOL * @see java.lang.Character#MODIFIER_LETTER * @see java.lang.Character#MODIFIER_SYMBOL * @see java.lang.Character#NON_SPACING_MARK * @see java.lang.Character#OTHER_LETTER * @see java.lang.Character#OTHER_NUMBER * @see java.lang.Character#OTHER_PUNCTUATION * @see java.lang.Character#OTHER_SYMBOL * @see java.lang.Character#PARAGRAPH_SEPARATOR * @see java.lang.Character#PRIVATE_USE * @see java.lang.Character#SPACE_SEPARATOR * @see java.lang.Character#START_PUNCTUATION * @see java.lang.Character#SURROGATE * @see java.lang.Character#TITLECASE_LETTER * @see java.lang.Character#UNASSIGNED * @see java.lang.Character#UPPERCASE_LETTER * @since 1.1 */ public static int getType(char ch) { return 0; } /** * Determines the character representation for a specific digit in * the specified radix. If the value of radix is not a * valid radix, or the value of digit is not a valid * digit in the specified radix, the null character * ('\u0000') is returned. *

* The radix argument is valid if it is greater than or * equal to MIN_RADIX and less than or equal to * MAX_RADIX. The digit argument is valid if * 0 <=digit < radix. *

* If the digit is less than 10, then * '0' + digit is returned. Otherwise, the value * 'a' + digit - 10 is returned. * * @param digit the number to convert to a character. * @param radix the radix. * @return the char representation of the specified digit * in the specified radix. * @see java.lang.Character#MIN_RADIX * @see java.lang.Character#MAX_RADIX * @see java.lang.Character#digit(char, int) */ public static char forDigit(int digit, int radix) { return ' '; } /** * Returns the Unicode directionality property for the given * character. Character directionality is used to calculate the * visual ordering of text. The directionality value of undefined * char values is DIRECTIONALITY_UNDEFINED. * * @param ch char for which the directionality property * is requested. * @return the directionality property of the char value. * * @see Character#DIRECTIONALITY_UNDEFINED * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR * @see Character#DIRECTIONALITY_ARABIC_NUMBER * @see Character#DIRECTIONALITY_COMMON_NUMBER_SEPARATOR * @see Character#DIRECTIONALITY_NONSPACING_MARK * @see Character#DIRECTIONALITY_BOUNDARY_NEUTRAL * @see Character#DIRECTIONALITY_PARAGRAPH_SEPARATOR * @see Character#DIRECTIONALITY_SEGMENT_SEPARATOR * @see Character#DIRECTIONALITY_WHITESPACE * @see Character#DIRECTIONALITY_OTHER_NEUTRALS * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING * @see Character#DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING * @see Character#DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE * @see Character#DIRECTIONALITY_POP_DIRECTIONAL_FORMAT * @since 1.4 */ public static byte getDirectionality(char ch) { return ' '; } /** * Determines whether the character is mirrored according to the * Unicode specification. Mirrored characters should have their * glyphs horizontally mirrored when displayed in text that is * right-to-left. For example, '\u0028' LEFT * PARENTHESIS is semantically defined to be an opening * parenthesis. This will appear as a "(" in text that is * left-to-right but as a ")" in text that is right-to-left. * * @param ch char for which the mirrored property is requested * @return true if the char is mirrored, false * if the char is not mirrored or is not defined. * @since 1.4 */ public static boolean isMirrored(char ch) { return false; } /** * Compares two Character objects numerically. * * @param anotherCharacter the Character to be compared. * * @return the value 0 if the argument Character * is equal to this Character; a value less than * 0 if this Character is numerically less * than the Character argument; and a value greater than * 0 if this Character is numerically greater * than the Character argument (unsigned comparison). * Note that this is strictly a numerical comparison; it is not * locale-dependent. * @since 1.2 */ public int compareTo(java.lang.Character anotherCharacter) { return 0; } /** * Compares this Character object to another object. * If the object is a Character, this function * behaves like compareTo(Character). Otherwise, it * throws a ClassCastException (as * Character objects are comparable only to other * Character objects). * * @param o the Object to be compared. * @return the value 0 if the argument is a Character * numerically equal to this Character; a value less than * 0 if the argument is a Character numerically * greater than this Character; and a value greater than * 0 if the argument is a Character numerically * less than this Character. * @exception ClassCastException if the argument is not a * Character. * @see java.lang.Comparable * @since 1.2 */ public int compareTo(java.lang.Object o) { return 0; } /** * Instances of this class represent particular subsets of the Unicode * character set. The only family of subsets defined in the * Character class is {@link Character.UnicodeBlock * UnicodeBlock}. Other portions of the Java API may define other * subsets for their own purposes. * * @since 1.2 */ public static class Subset { /** * Constructs a new Subset instance. * * @exception NullPointerException if name is null * @param name The name of this subset */ protected Subset(java.lang.String name) { } /** * Compares two Subset objects for equality. * This method returns true if and only if * this and the argument refer to the same * object; since this method is final, this * guarantee holds for all subclasses. */ public final boolean equals(java.lang.Object obj) { return false; } /** * Returns the standard hash code as defined by the * {@link Object#hashCode} method. This method * is final in order to ensure that the * equals and hashCode methods will * be consistent in all subclasses. */ public final int hashCode() { return 0; } /** * Returns the name of this subset. */ public final java.lang.String toString() { return null; } } /** * A family of character subsets representing the character blocks in the * Unicode specification. Character blocks generally define characters * used for a specific script or purpose. A character is contained by * at most one Unicode block. * * @since 1.2 */ public static final class UnicodeBlock extends java.lang.Character.Subset { /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock BASIC_LATIN = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LATIN_1_SUPPLEMENT = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_A = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_B = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock IPA_EXTENSIONS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock SPACING_MODIFIER_LETTERS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock COMBINING_DIACRITICAL_MARKS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GREEK = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CYRILLIC = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ARMENIAN = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HEBREW = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ARABIC = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock DEVANAGARI = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock BENGALI = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GURMUKHI = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GUJARATI = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ORIYA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock TAMIL = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock TELUGU = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock KANNADA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock MALAYALAM = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock THAI = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LAO = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock TIBETAN = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GEORGIAN = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HANGUL_JAMO = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LATIN_EXTENDED_ADDITIONAL = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GREEK_EXTENDED = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GENERAL_PUNCTUATION = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock SUPERSCRIPTS_AND_SUBSCRIPTS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CURRENCY_SYMBOLS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock COMBINING_MARKS_FOR_SYMBOLS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock LETTERLIKE_SYMBOLS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock NUMBER_FORMS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ARROWS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock MATHEMATICAL_OPERATORS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_TECHNICAL = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CONTROL_PICTURES = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock OPTICAL_CHARACTER_RECOGNITION = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ENCLOSED_ALPHANUMERICS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock BOX_DRAWING = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock BLOCK_ELEMENTS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock GEOMETRIC_SHAPES = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock MISCELLANEOUS_SYMBOLS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock DINGBATS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CJK_SYMBOLS_AND_PUNCTUATION = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HIRAGANA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock KATAKANA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock BOPOMOFO = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HANGUL_COMPATIBILITY_JAMO = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock KANBUN = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ENCLOSED_CJK_LETTERS_AND_MONTHS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HANGUL_SYLLABLES = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock SURROGATES_AREA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock PRIVATE_USE_AREA = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_IDEOGRAPHS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ALPHABETIC_PRESENTATION_FORMS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_A = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock COMBINING_HALF_MARKS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock CJK_COMPATIBILITY_FORMS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock SMALL_FORM_VARIANTS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock ARABIC_PRESENTATION_FORMS_B = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock HALFWIDTH_AND_FULLWIDTH_FORMS = null; /** * Constant for the Unicode character block of the same name. */ public static final java.lang.Character.UnicodeBlock SPECIALS = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock SYRIAC = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock THAANA = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock SINHALA = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock MYANMAR = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock ETHIOPIC = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock CHEROKEE = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock UNIFIED_CANADIAN_ABORIGINAL_SYLLABICS = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock OGHAM = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock RUNIC = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock KHMER = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock MONGOLIAN = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock BRAILLE_PATTERNS = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock CJK_RADICALS_SUPPLEMENT = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock KANGXI_RADICALS = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock IDEOGRAPHIC_DESCRIPTION_CHARACTERS = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock BOPOMOFO_EXTENDED = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock CJK_UNIFIED_IDEOGRAPHS_EXTENSION_A = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock YI_SYLLABLES = null; /** * Constant for the Unicode character block of the same name. * * @since 1.4 */ public static final java.lang.Character.UnicodeBlock YI_RADICALS = null; /* * This hidden constructor does not necessarily correspond to * a constructor in the original source file -- it keeps javadoc * from generating an inappropriate default constructor. */ private UnicodeBlock() { super(null); } /** * Returns the object representing the Unicode block containing the * given character, or null if the character is not a * member of a defined block. * * @param c The character in question * @return The UnicodeBlock instance representing the * Unicode block of which this character is a member, or * null if the character is not a member of any * Unicode block */ public static java.lang.Character.UnicodeBlock of(char c) { return null; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy