API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.lang. Character View Source
Author(s)
Lee Boynton
Guy Steele
Akira Tanaka
Since
1.0
Version
Serial
Hierarchy
 Object
      Character
Implements
 Serializable
 Comparable
Subclasses
Description
publicfinal class Character
  The Character class wraps a value of the primitive type char in an object.
See also:   
Constructors
public Character (char value)
  Constructs a newly allocated Character object that represents the specified char value.
Methods
Hide/Show inherited methods
publicstatic int charCount (int codePoint)
  Determines the number of char values needed to represent the specified character (Unicode code point).
public char charValue ()
  Returns the value of this Character object.
publicstatic int codePointAt (char[] a, int index)
  Returns the code point at the given index of the char array.
publicstatic int codePointAt (char[] a, int index, int limit)
  Returns the code point at the given index of the char array, where only array elements with index less than limit can be used.
publicstatic int codePointAt (CharSequence seq, int index)
  Returns the code point at the given index of the CharSequence.
pack-privatestatic int codePointAtImpl (char[] a, int index, int limit)
publicstatic int codePointBefore (char[] a, int index)
  Returns the code point preceding the given index of the char array.
publicstatic int codePointBefore (char[] a, int index, int start)
  Returns the code point preceding the given index of the char array, where only array elements with index greater than or equal to start can be used.
publicstatic int codePointBefore (CharSequence seq, int index)
  Returns the code point preceding the given index of the CharSequence.
pack-privatestatic int codePointBeforeImpl (char[] a, int index, int start)
publicstatic int codePointCount (char[] a, int offset, int count)
  Returns the number of Unicode code points in a subarray of the char array argument.
publicstatic int codePointCount (CharSequence seq, int beginIndex, int endIndex)
  Returns the number of Unicode code points in the text range of the specified char sequence.
pack-privatestatic int codePointCountImpl (char[] a, int offset, int count)
public int compareTo (Character anotherCharacter)
  Compares two Character objects numerically.
publicstatic int digit (char ch, int radix)
  Returns the numeric value of the character ch in the specified radix.
publicstatic int digit (int codePoint, int radix)
  Returns the numeric value of the specified character (Unicode code point) in the specified radix.
public boolean equals (Object obj)
  Compares this object against the specified object.
publicstatic char forDigit (int digit, int radix)
  Determines the character representation for a specific digit in the specified radix.
publicstatic byte getDirectionality (char ch)
  Returns the Unicode directionality property for the given character.
publicstatic byte getDirectionality (int codePoint)
  Returns the Unicode directionality property for the given character (Unicode code point).
publicstatic int getNumericValue (char ch)
  Returns the int value that the specified Unicode character represents.
publicstatic int getNumericValue (int codePoint)
  Returns the int value that the specified character (Unicode code point) represents.
publicstatic int getType (char ch)
  Returns a value indicating a character's general category.
publicstatic int getType (int codePoint)
  Returns a value indicating a character's general category.
public int hashCode ()
  Returns a hash code for this Character.
publicstatic boolean isDefined (char ch)
  Determines if a character is defined in Unicode.
publicstatic boolean isDefined (int codePoint)
  Determines if a character (Unicode code point) is defined in Unicode.
publicstatic boolean isDigit (char ch)
  Determines if the specified character is a digit.
publicstatic boolean isDigit (int codePoint)
  Determines if the specified character (Unicode code point) is a digit.
publicstatic boolean isHighSurrogate (char ch)
  Determines if the given char value is a high-surrogate code unit (also known as leading-surrogate code unit).
publicstatic boolean isIdentifierIgnorable (char ch)
  Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
publicstatic boolean isIdentifierIgnorable (int codePoint)
  Determines if the specified character (Unicode code point) should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
publicstatic boolean isISOControl (char ch)
  Determines if the specified character is an ISO control character.
publicstatic boolean isISOControl (int codePoint)
  Determines if the referenced character (Unicode code point) is an ISO control character.
publicstatic boolean isJavaIdentifierPart (char ch)
  Determines if the specified character may be part of a Java identifier as other than the first character.
publicstatic boolean isJavaIdentifierPart (int codePoint)
  Determines if the character (Unicode code point) may be part of a Java identifier as other than the first character.
publicstatic boolean isJavaIdentifierStart (char ch)
  Determines if the specified character is permissible as the first character in a Java identifier.
publicstatic boolean isJavaIdentifierStart (int codePoint)
  Determines if the character (Unicode code point) is permissible as the first character in a Java identifier.
@Deprecated
publicstatic boolean isJavaLetter (char ch)
  Determines if the specified character is permissible as the first character in a Java identifier.
@Deprecated
publicstatic boolean isJavaLetterOrDigit (char ch)
  Determines if the specified character may be part of a Java identifier as other than the first character.
publicstatic boolean isLetter (char ch)
  Determines if the specified character is a letter.
publicstatic boolean isLetter (int codePoint)
  Determines if the specified character (Unicode code point) is a letter.
publicstatic boolean isLetterOrDigit (char ch)
  Determines if the specified character is a letter or digit.
publicstatic boolean isLetterOrDigit (int codePoint)
  Determines if the specified character (Unicode code point) is a letter or digit.
publicstatic boolean isLowerCase (char ch)
  Determines if the specified character is a lowercase character.
publicstatic boolean isLowerCase (int codePoint)
  Determines if the specified character (Unicode code point) is a lowercase character.
publicstatic boolean isLowSurrogate (char ch)
  Determines if the given char value is a low-surrogate code unit (also known as trailing-surrogate code unit).
publicstatic boolean isMirrored (char ch)
  Determines whether the character is mirrored according to the Unicode specification.
publicstatic boolean isMirrored (int codePoint)
  Determines whether the specified character (Unicode code point) is mirrored according to the Unicode specification.
@Deprecated
publicstatic boolean isSpace (char ch)
  Determines if the specified character is ISO-LATIN-1 white space.
publicstatic boolean isSpaceChar (char ch)
  Determines if the specified character is a Unicode space character.
publicstatic boolean isSpaceChar (int codePoint)
  Determines if the specified character (Unicode code point) is a Unicode space character.
publicstatic boolean isSupplementaryCodePoint (int codePoint)
  Determines whether the specified character (Unicode code point) is in the supplementary character range.
publicstatic boolean isSurrogatePair (char high, char low)
  Determines whether the specified pair of char values is a valid surrogate pair.
publicstatic boolean isTitleCase (char ch)
  Determines if the specified character is a titlecase character.
publicstatic boolean isTitleCase (int codePoint)
  Determines if the specified character (Unicode code point) is a titlecase character.
publicstatic boolean isUnicodeIdentifierPart (char ch)
  Determines if the specified character may be part of a Unicode identifier as other than the first character.
publicstatic boolean isUnicodeIdentifierPart (int codePoint)
  Determines if the specified character (Unicode code point) may be part of a Unicode identifier as other than the first character.
publicstatic boolean isUnicodeIdentifierStart (char ch)
  Determines if the specified character is permissible as the first character in a Unicode identifier.
publicstatic boolean isUnicodeIdentifierStart (int codePoint)
  Determines if the specified character (Unicode code point) is permissible as the first character in a Unicode identifier.
publicstatic boolean isUpperCase (char ch)
  Determines if the specified character is an uppercase character.
publicstatic boolean isUpperCase (int codePoint)
  Determines if the specified character (Unicode code point) is an uppercase character.
publicstatic boolean isValidCodePoint (int codePoint)
  Determines whether the specified code point is a valid Unicode code point value in the range of 0x0000 to 0x10FFFF inclusive.
publicstatic boolean isWhitespace (char ch)
  Determines if the specified character is white space according to Java.
publicstatic boolean isWhitespace (int codePoint)
  Determines if the specified character (Unicode code point) is white space according to Java.
publicstatic int offsetByCodePoints (char[] a, int start, int count, int index, int codePointOffset)
  Returns the index within the given char subarray that is offset from the given index by codePointOffset code points.
publicstatic int offsetByCodePoints (CharSequence seq, int index, int codePointOffset)
  Returns the index within the given char sequence that is offset from the given index by codePointOffset code points.
pack-privatestatic int offsetByCodePointsImpl (char[] a, int start, int count, int index, int codePointOffset)
publicstatic char reverseBytes (char ch)
  Returns the value obtained by reversing the order of the bytes in the specified char value.
publicstatic char toChars (int codePoint)
  Converts the specified character (Unicode code point) to its UTF-16 representation stored in a char array.
publicstatic int toChars (int codePoint, char[] dst, int dstIndex)
  Converts the specified character (Unicode code point) to its UTF-16 representation.
publicstatic int toCodePoint (char high, char low)
  Converts the specified surrogate pair to its supplementary code point value.
publicstatic char toLowerCase (char ch)
  Converts the character argument to lowercase using case mapping information from the UnicodeData file.
publicstatic int toLowerCase (int codePoint)
  Converts the character (Unicode code point) argument to lowercase using case mapping information from the UnicodeData file.
public String toString ()
  Returns a String object representing this Character's value.
publicstatic String toString (char c)
  Returns a String object representing the specified char.
pack-privatestatic void toSurrogates (int codePoint, char[] dst, int index)
publicstatic char toTitleCase (char ch)
  Converts the character argument to titlecase using case mapping information from the UnicodeData file.
publicstatic int toTitleCase (int codePoint)
  Converts the character (Unicode code point) argument to titlecase using case mapping information from the UnicodeData file.
publicstatic char toUpperCase (char ch)
  Converts the character argument to uppercase using case mapping information from the UnicodeData file.
publicstatic int toUpperCase (int codePoint)
  Converts the character (Unicode code point) argument to uppercase using case mapping information from the UnicodeData file.
pack-privatestatic char toUpperCaseCharArray (int codePoint)
  Converts the character (Unicode code point) argument to uppercase using case mapping information from the SpecialCasing file in the Unicode specification.
pack-privatestatic int toUpperCaseEx (int codePoint)
  Converts the character (Unicode code point) argument to uppercase using information from the UnicodeData file.
publicstatic Character valueOf (char c)
  Returns a Character instance representing the specified char value.
Fields
Hide/Show inherited fields
publicfinalstatic byte COMBINING_SPACING_MARK = "8"
  General category "Mc" in the Unicode specification.
publicfinalstatic byte CONNECTOR_PUNCTUATION = "23"
  General category "Pc" in the Unicode specification.
publicfinalstatic byte CONTROL = "15"
  General category "Cc" in the Unicode specification.
publicfinalstatic byte CURRENCY_SYMBOL = "26"
  General category "Sc" in the Unicode specification.
publicfinalstatic byte DASH_PUNCTUATION = "20"
  General category "Pd" in the Unicode specification.
publicfinalstatic byte DECIMAL_DIGIT_NUMBER = "9"
  General category "Nd" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_ARABIC_NUMBER = "6"
  Weak bidirectional character type "AN" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_BOUNDARY_NEUTRAL = "9"
  Weak bidirectional character type "BN" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR = "7"
  Weak bidirectional character type "CS" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_EUROPEAN_NUMBER = "3"
  Weak bidirectional character type "EN" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR = "4"
  Weak bidirectional character type "ES" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR = "5"
  Weak bidirectional character type "ET" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_LEFT_TO_RIGHT = "0"
  Strong bidirectional character type "L" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING = "14"
  Strong bidirectional character type "LRE" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE = "15"
  Strong bidirectional character type "LRO" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_NONSPACING_MARK = "8"
  Weak bidirectional character type "NSM" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_OTHER_NEUTRALS = "13"
  Neutral bidirectional character type "ON" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_PARAGRAPH_SEPARATOR = "10"
  Neutral bidirectional character type "B" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT = "18"
  Weak bidirectional character type "PDF" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_RIGHT_TO_LEFT = "1"
  Strong bidirectional character type "R" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC = "2"
  Strong bidirectional character type "AL" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING = "16"
  Strong bidirectional character type "RLE" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE = "17"
  Strong bidirectional character type "RLO" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_SEGMENT_SEPARATOR = "11"
  Neutral bidirectional character type "S" in the Unicode specification.
publicfinalstatic byte DIRECTIONALITY_UNDEFINED = "-1"
  Undefined bidirectional character type.
publicfinalstatic byte DIRECTIONALITY_WHITESPACE = "12"
  Neutral bidirectional character type "WS" in the Unicode specification.
publicfinalstatic byte ENCLOSING_MARK = "7"
  General category "Me" in the Unicode specification.
publicfinalstatic byte END_PUNCTUATION = "22"
  General category "Pe" in the Unicode specification.
pack-privatefinalstatic int ERROR = "-1"
  Error flag.
publicfinalstatic byte FINAL_QUOTE_PUNCTUATION = "30"
  General category "Pf" in the Unicode specification.
publicfinalstatic byte FORMAT = "16"
  General category "Cf" in the Unicode specification.
publicfinalstatic byte INITIAL_QUOTE_PUNCTUATION = "29"
  General category "Pi" in the Unicode specification.
publicfinalstatic byte LETTER_NUMBER = "10"
  General category "Nl" in the Unicode specification.
publicfinalstatic byte LINE_SEPARATOR = "13"
  General category "Zl" in the Unicode specification.
publicfinalstatic byte LOWERCASE_LETTER = "2"
  General category "Ll" in the Unicode specification.
publicfinalstatic byte MATH_SYMBOL = "25"
  General category "Sm" in the Unicode specification.
publicfinalstatic int MAX_CODE_POINT = "1114111"
  The maximum value of a Unicode code point.
publicfinalstatic char MAX_HIGH_SURROGATE = "56319"
  The maximum value of a Unicode high-surrogate code unit in the UTF-16 encoding.
publicfinalstatic char MAX_LOW_SURROGATE = "57343"
  The maximum value of a Unicode low-surrogate code unit in the UTF-16 encoding.
publicfinalstatic int MAX_RADIX = "36"
  The maximum radix available for conversion to and from strings.
publicfinalstatic char MAX_SURROGATE = "57343"
  The maximum value of a Unicode surrogate code unit in the UTF-16 encoding.
publicfinalstatic char MAX_VALUE = "65535"
  The constant value of this field is the largest value of type char, '\uFFFF'.
publicfinalstatic int MIN_CODE_POINT = "0"
  The minimum value of a Unicode code point.
publicfinalstatic char MIN_HIGH_SURROGATE = "55296"
  The minimum value of a Unicode high-surrogate code unit in the UTF-16 encoding.
publicfinalstatic char MIN_LOW_SURROGATE = "56320"
  The minimum value of a Unicode low-surrogate code unit in the UTF-16 encoding.
publicfinalstatic int MIN_RADIX = "2"
  The minimum radix available for conversion to and from strings.
publicfinalstatic int MIN_SUPPLEMENTARY_CODE_POINT = "65536"
  The minimum value of a supplementary code point.
publicfinalstatic char MIN_SURROGATE = "55296"
  The minimum value of a Unicode surrogate code unit in the UTF-16 encoding.
publicfinalstatic char MIN_VALUE = "0"
  The constant value of this field is the smallest value of type char, '\u0000'.
publicfinalstatic byte MODIFIER_LETTER = "4"
  General category "Lm" in the Unicode specification.
publicfinalstatic byte MODIFIER_SYMBOL = "27"
  General category "Sk" in the Unicode specification.
publicfinalstatic byte NON_SPACING_MARK = "6"
  General category "Mn" in the Unicode specification.
publicfinalstatic byte OTHER_LETTER = "5"
  General category "Lo" in the Unicode specification.
publicfinalstatic byte OTHER_NUMBER = "11"
  General category "No" in the Unicode specification.
publicfinalstatic byte OTHER_PUNCTUATION = "24"
  General category "Po" in the Unicode specification.
publicfinalstatic byte OTHER_SYMBOL = "28"
  General category "So" in the Unicode specification.
publicfinalstatic byte PARAGRAPH_SEPARATOR = "14"
  General category "Zp" in the Unicode specification.
publicfinalstatic byte PRIVATE_USE = "18"
  General category "Co" in the Unicode specification.
publicfinalstatic int SIZE = "16"
  The number of bits used to represent a char value in unsigned binary form.
publicfinalstatic byte SPACE_SEPARATOR = "12"
  General category "Zs" in the Unicode specification.
publicfinalstatic byte START_PUNCTUATION = "21"
  General category "Ps" in the Unicode specification.
publicfinalstatic byte SURROGATE = "19"
  General category "Cs" in the Unicode specification.
publicfinalstatic byte TITLECASE_LETTER = "3"
  General category "Lt" in the Unicode specification.
publicfinalstatic Class<Character> TYPE
  The Class instance representing the primitive type char.
publicfinalstatic byte UNASSIGNED = "0"
  General category "Cn" in the Unicode specification.
publicfinalstatic byte UPPERCASE_LETTER = "1"
  General category "Lu" in the Unicode specification.
Nested Classes
  Character.Subset
Instances of this class represent particular subsets of the Unicode character set.
  Character.UnicodeBlock
A family of character subsets representing the character blocks in the Unicode specification.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar