Character class

The Character class wraps the primitive type char.

ConstructorSummary
Character(char value)Creates a Character object for char value.

Get char value from Character object

ReturnMethodSummary
charcharValue()Returns the value of this Character object.

Check the character type

ReturnMethodSummary
static booleanisDefined(char ch)if a character is defined in Unicode.
static booleanisDigit(char ch)if the character is a digit.
static booleanisHighSurrogate(char ch)if the char is a high-surrogate code unit.
static booleanisIdentifierIgnorable(char ch)if the character should be regarded as an ignorable character in a Java identifier or a Unicode identifier.
static booleanisISOControl(char ch)if the character is an ISO control character.
static booleanisJavaIdentifierPart(char ch)if the character may be part of a Java identifier as other than the first character.
static booleanisJavaIdentifierStart(char ch)if the character is permissible as the first character in a Java identifier.
static booleanisLetter(char ch)if the character is a letter.
static booleanisLetterOrDigit(char ch)if the character is a letter or digit.
static booleanisLowerCase(char ch)if the character is a lowercase character.
static booleanisLowSurrogate(char ch)if the char value is a low-surrogate code unit.
static booleanisMirrored(char ch)whether the character is mirrored according to the Unicode specification.
static booleanisSpaceChar(char ch)if the character is a Unicode space character.
static booleanisSurrogatePair(char high, char low)whether the pair of char values is a valid surrogate pair.
static booleanisTitleCase(char ch)if the character is a titlecase character.
static booleanisUnicodeIdentifierPart(char ch)if the character may be part of a Unicode identifier as other than the first character.
static booleanisUnicodeIdentifierStart(char ch)if the character is permissible as the first character in a Unicode identifier.
static booleanisUpperCase(char ch)if the character is an uppercase character.
static booleanisWhitespace(char ch)if the character is white space according to Java.

Get the char type from char value

ReturnMethodSummary
static intgetType(char ch)Returns a value indicating a character's general category.

Change character case

ReturnMethodSummary
static chartoTitleCase(char ch)Converts to titlecase.
static chartoUpperCase(char ch)Converts to uppercase.
static chartoLowerCase(char ch)Converts to lowercase.

Compare two characters

ReturnMethodSummary
intcompareTo(Character anotherCharacter)Compares two Character objects numerically.
booleanequals(Object obj)Compares this object against the specified object.

Convert character to String

ReturnMethodSummary
static StringtoString(char c)Returns a String object representing the specified char.
StringtoString()Returns a String object representing this Character's value.

Get the numeric value for a char

ReturnMethodSummary
static intgetNumericValue(char ch)Returns the int value that the specified Unicode character represents.

Convert digit to char with radix

ReturnMethodSummary
static charforDigit(int digit, int radix)Determines the character representation for a specific digit in the specified radix.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.