Build 1.1_r1 (from source)

java.lang
Class Character

java.lang.Object
  extended by java.lang.Character
All Implemented Interfaces:
Serializable, Comparable<Character>

public final class Character
extends Object
implements Serializable, Comparable<Character>

The wrapper for the primitive type char. This class also provides a number of utility methods for working with characters.

Character data is based upon the Unicode Standard, 4.0. The Unicode specification, character tables and other information are available at http://www.unicode.org/.

Unicode characters are referred to as code points. The range of valid code points is U+0000 to U+10FFFF. The Basic Multilingual Plane (BMP) is the code point range U+0000 to U+FFFF. Characters above the BMP are referred to as Supplementary Characters. On the Java platform, UTF-16 encoding and char pairs are used to represent code points in the supplementary range. A pair of char values that represent a supplementary character are made up of a high surrogate with a value range of 0xD800 to 0xDBFF and a low surrogate with a value range of 0xDC00 to 0xDFFF.

On the Java platform a char value represents either a single BMP code point or a UTF-16 unit that's part of a surrogate pair. The int type is used to represent all Unicode code points.

Since:
Android 1.0
See Also:
Serialized Form

Nested Class Summary
static class Character.Subset
          Represents a subset of the Unicode character set.
static class Character.UnicodeBlock
          Represents a block of Unicode characters, as defined by the Unicode 4.0.1 specification.
(package private) static class Character.valueOfCache
           
 
Field Summary
static byte COMBINING_SPACING_MARK
          Unicode category constant Mc.
static byte CONNECTOR_PUNCTUATION
          Unicode category constant Pc.
static byte CONTROL
          Unicode category constant Cc.
static byte CURRENCY_SYMBOL
          Unicode category constant Sc.
static byte DASH_PUNCTUATION
          Unicode category constant Pd.
static byte DECIMAL_DIGIT_NUMBER
          Unicode category constant Nd.
static byte DIRECTIONALITY_ARABIC_NUMBER
          Unicode bidirectional constant AN.
static byte DIRECTIONALITY_BOUNDARY_NEUTRAL
          Unicode bidirectional constant BN.
static byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
          Unicode bidirectional constant CS.
static byte DIRECTIONALITY_EUROPEAN_NUMBER
          Unicode bidirectional constant EN.
static byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
          Unicode bidirectional constant ES.
static byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
          Unicode bidirectional constant ET.
static byte DIRECTIONALITY_LEFT_TO_RIGHT
          Unicode bidirectional constant L.
static byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
          Unicode bidirectional constant LRE.
static byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
          Unicode bidirectional constant LRO.
static byte DIRECTIONALITY_NONSPACING_MARK
          Unicode bidirectional constant NSM.
static byte DIRECTIONALITY_OTHER_NEUTRALS
          Unicode bidirectional constant ON.
static byte DIRECTIONALITY_PARAGRAPH_SEPARATOR
          Unicode bidirectional constant B.
static byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
          Unicode bidirectional constant PDF.
static byte DIRECTIONALITY_RIGHT_TO_LEFT
          Unicode bidirectional constant R.
static byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
          Unicode bidirectional constant AL.
static byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
          Unicode bidirectional constant RLE.
static byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
          Unicode bidirectional constant RLO.
static byte DIRECTIONALITY_SEGMENT_SEPARATOR
          Unicode bidirectional constant S.
static byte DIRECTIONALITY_UNDEFINED
          Unicode bidirectional constant.
static byte DIRECTIONALITY_WHITESPACE
          Unicode bidirectional constant WS.
static byte ENCLOSING_MARK
          Unicode category constant Me.
static byte END_PUNCTUATION
          Unicode category constant Pe.
static byte FINAL_QUOTE_PUNCTUATION
          Unicode category constant Pf.
static byte FORMAT
          Unicode category constant Cf.
static byte INITIAL_QUOTE_PUNCTUATION
          Unicode category constant Pi.
static byte LETTER_NUMBER
          Unicode category constant Nl.
static byte LINE_SEPARATOR
          Unicode category constant Zl.
static byte LOWERCASE_LETTER
          Unicode category constant Ll.
static byte MATH_SYMBOL
          Unicode category constant Sm.
static int MAX_CODE_POINT
          The maximum code point value, U+10FFFF.
static char MAX_HIGH_SURROGATE
          The maximum value of a high surrogate or leading surrogate unit in UTF-16 encoding, '?'.
static char MAX_LOW_SURROGATE
          The maximum value of a low surrogate or trailing surrogate unit in UTF-16 encoding, '?'.
static int MAX_RADIX
          The maximum radix used for conversions between characters and integers.
static char MAX_SURROGATE
          The maximum value of a surrogate unit in UTF-16 encoding, '?'.
static char MAX_VALUE
          The maximum Character value.
static int MIN_CODE_POINT
          The minimum code point value, U+0000.
static char MIN_HIGH_SURROGATE
          The minimum value of a high surrogate or leading surrogate unit in UTF-16 encoding, '?'.
static char MIN_LOW_SURROGATE
          The minimum value of a low surrogate or trailing surrogate unit in UTF-16 encoding, '?'.
static int MIN_RADIX
          The minimum radix used for conversions between characters and integers.
static int MIN_SUPPLEMENTARY_CODE_POINT
          The minimum value of a supplementary code point, U+010000.
static char MIN_SURROGATE
          The minimum value of a surrogate unit in UTF-16 encoding, '?'.
static char MIN_VALUE
          The minimum Character value.
static byte MODIFIER_LETTER
          Unicode category constant Lm.
static byte MODIFIER_SYMBOL
          Unicode category constant Sk.
static byte NON_SPACING_MARK
          Unicode category constant Mn.
static byte OTHER_LETTER
          Unicode category constant Lo.
static byte OTHER_NUMBER
          Unicode category constant No.
static byte OTHER_PUNCTUATION
          Unicode category constant Po.
static byte OTHER_SYMBOL
          Unicode category constant So.
static byte PARAGRAPH_SEPARATOR
          Unicode category constant Zp.
static byte PRIVATE_USE
          Unicode category constant Co.
static int SIZE
          The number of bits required to represent a Character value in two's compliment form.
static byte SPACE_SEPARATOR
          Unicode category constant Zs.
static byte START_PUNCTUATION
          Unicode category constant Ps.
static byte SURROGATE
          Unicode category constant Cs.
static byte TITLECASE_LETTER
          Unicode category constant Lt.
static Class<Character> TYPE
          The Class object that represents the primitive type char.
static byte UNASSIGNED
          Unicode category constant Cn.
static byte UPPERCASE_LETTER
          Unicode category constant Lu.
 
Constructor Summary
Character(char value)
          Constructs a new Character with the specified primitive char value.
 
Method Summary
static int charCount(int codePoint)
          Calculates the number of char values required to represent the specified Unicode code point.
 char charValue()
          Gets the primitive value of this character.
static int codePointAt(char[] seq, int index)
          Returns the code point at index in the specified array of character units.
static int codePointAt(char[] seq, int index, int limit)
          Returns the code point at index in the specified array of character units, where index has to be less than limit.
static int codePointAt(CharSequence seq, int index)
          Returns the code point at index in the specified sequence of character units.
static int codePointBefore(char[] seq, int index)
          Returns the code point that preceds index in the specified array of character units.
static int codePointBefore(char[] seq, int index, int start)
          Returns the code point that preceds the index in the specified array of character units and is not less than start.
static int codePointBefore(CharSequence seq, int index)
          Returns the code point that preceds index in the specified sequence of character units.
static int codePointCount(char[] seq, int offset, int count)
          Counts the number of Unicode code points in the subsequence of the specified char array, as delineated by offset and count.
static int codePointCount(CharSequence seq, int beginIndex, int endIndex)
          Counts the number of Unicode code points in the subsequence of the specified character sequence, as delineated by beginIndex and endIndex.
 int compareTo(Character c)
          Compares this object to the specified character object to determine their relative order.
static int digit(char c, int radix)
          Convenience method to determine the value of the specified character c in the supplied radix.
static int digit(int codePoint, int radix)
          Convenience method to determine the value of the character codePoint in the supplied radix.
 boolean equals(Object object)
          Compares this object with the specified object and indicates if they are equal.
static char forDigit(int digit, int radix)
          Returns the character which represents the specified digit in the specified radix.
static byte getDirectionality(char c)
          Gets the Unicode directionality of the specified character.
static byte getDirectionality(int codePoint)
          Gets the Unicode directionality of the specified character.
static int getNumericValue(char c)
          Gets the numeric value of the specified Unicode character.
static int getNumericValue(int codePoint)
          Gets the numeric value of the specified Unicode code point.
static int getType(char c)
          Gets the general Unicode category of the specified character.
static int getType(int codePoint)
          Gets the general Unicode category of the specified code point.
 int hashCode()
          Returns an integer hash code for this object.
static boolean isDefined(char c)
          Indicates whether the specified character is defined in the Unicode specification.
static boolean isDefined(int codePoint)
          Indicates whether the specified code point is defined in the Unicode specification.
static boolean isDigit(char c)
          Indicates whether the specified character is a digit.
static boolean isDigit(int codePoint)
          Indicates whether the specified code point is a digit.
static boolean isHighSurrogate(char ch)
          Indicates whether ch is a high- (or leading-) surrogate code unit that is used for representing supplementary characters in UTF-16 encoding.
static boolean isIdentifierIgnorable(char c)
          Indicates whether the specified character is ignorable in a Java or Unicode identifier.
static boolean isIdentifierIgnorable(int codePoint)
          Indicates whether the specified code point is ignorable in a Java or Unicode identifier.
static boolean isISOControl(char c)
          Indicates whether the specified character is an ISO control character.
static boolean isISOControl(int c)
          Indicates whether the specified code point is an ISO control character.
static boolean isJavaIdentifierPart(char c)
          Indicates whether the specified character is a valid part of a Java identifier other than the first character.
static boolean isJavaIdentifierPart(int codePoint)
          Indicates whether the specified code point is a valid part of a Java identifier other than the first character.
static boolean isJavaIdentifierStart(char c)
          Indicates whether the specified character is a valid first character for a Java identifier.
static boolean isJavaIdentifierStart(int codePoint)
          Indicates whether the specified code point is a valid start for a Java identifier.
static boolean isJavaLetter(char c)
          Deprecated. Use isJavaIdentifierStart(char)
static boolean isJavaLetterOrDigit(char c)
          Deprecated. Use isJavaIdentifierPart(char)
static boolean isLetter(char c)
          Indicates whether the specified character is a letter.
static boolean isLetter(int codePoint)
          Indicates whether the specified code point is a letter.
static boolean isLetterOrDigit(char c)
          Indicates whether the specified character is a letter or a digit.
static boolean isLetterOrDigit(int codePoint)
          Indicates whether the specified code point is a letter or a digit.
static boolean isLowerCase(char c)
          Indicates whether the specified character is a lower case letter.
static boolean isLowerCase(int codePoint)
          Indicates whether the specified code point is a lower case letter.
static boolean isLowSurrogate(char ch)
          Indicates whether ch is a low- (or trailing-) surrogate code unit that is used for representing supplementary characters in UTF-16 encoding.
static boolean isMirrored(char c)
          Indicates whether the specified character is mirrored.
static boolean isMirrored(int codePoint)
          Indicates whether the specified code point is mirrored.
static boolean isSpace(char c)
          Deprecated. Use isWhitespace(char)
static boolean isSpaceChar(char c)
          Indicates whether the specified character is a Unicode space character.
static boolean isSpaceChar(int codePoint)
          Indicates whether the specified code point is a Unicode space character.
static boolean isSupplementaryCodePoint(int codePoint)
          Indicates whether codePoint is within the supplementary code point range.
static boolean isSurrogatePair(char high, char low)
          Indicates whether the specified character pair is a valid surrogate pair.
static boolean isTitleCase(char c)
          Indicates whether the specified character is a titlecase character.
static boolean isTitleCase(int codePoint)
          Indicates whether the specified code point is a titlecase character.
static boolean isUnicodeIdentifierPart(char c)
          Indicates whether the specified character is valid as part of a Unicode identifier other than the first character.
static boolean isUnicodeIdentifierPart(int codePoint)
          Indicates whether the specified code point is valid as part of a Unicode identifier other than the first character.
static boolean isUnicodeIdentifierStart(char c)
          Indicates whether the specified character is a valid initial character for a Unicode identifier.
static boolean isUnicodeIdentifierStart(int codePoint)
          Indicates whether the specified code point is a valid initial character for a Unicode identifier.
static boolean isUpperCase(char c)
          Indicates whether the specified character is an upper case letter.
static boolean isUpperCase(int codePoint)
          Indicates whether the specified code point is an upper case letter.
static boolean isValidCodePoint(int codePoint)
          Indicates whether codePoint is a valid Unicode code point.
static boolean isWhitespace(char c)
          Indicates whether the specified character is a whitespace character in Java.
static boolean isWhitespace(int codePoint)
          Indicates whether the specified code point is a whitespace character in Java.
static int offsetByCodePoints(char[] seq, int start, int count, int index, int codePointOffset)
          Determines the index in a subsequence of the specified character array that is offset codePointOffset code points from index.
static int offsetByCodePoints(CharSequence seq, int index, int codePointOffset)
          Determines the index in the specified character sequence that is offset codePointOffset code points from index.
static char reverseBytes(char c)
          Reverses the order of the first and second byte in the specified character.
static char[] toChars(int codePoint)
          Converts the specified Unicode code point into a UTF-16 encoded sequence and returns it as a char array.
static int toChars(int codePoint, char[] dst, int dstIndex)
          Converts the specified Unicode code point into a UTF-16 encoded sequence and copies the value(s) into the char array dst, starting at index dstIndex.
static int toCodePoint(char high, char low)
          Converts a surrogate pair into a Unicode code point.
static char toLowerCase(char c)
          Returns the lower case equivalent for the specified character if the character is an upper case letter.
static int toLowerCase(int codePoint)
          Returns the lower case equivalent for the specified code point if it is an upper case letter.
 String toString()
          Returns a string containing a concise, human-readable description of this object.
static String toString(char value)
          Converts the specified character to its string representation.
static char toTitleCase(char c)
          Returns the title case equivalent for the specified character if it exists.
static int toTitleCase(int codePoint)
          Returns the title case equivalent for the specified code point if it exists.
static char toUpperCase(char c)
          Returns the upper case equivalent for the specified character if the character is a lower case letter.
static int toUpperCase(int codePoint)
          Returns the upper case equivalent for the specified code point if the code point is a lower case letter.
static Character valueOf(char c)
          Returns a Character instance for the char value passed.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_VALUE

public static final char MIN_VALUE
The minimum Character value.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_VALUE

public static final char MAX_VALUE
The maximum Character value.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_RADIX

public static final int MIN_RADIX
The minimum radix used for conversions between characters and integers.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_RADIX

public static final int MAX_RADIX
The maximum radix used for conversions between characters and integers.

Since:
Android 1.0
See Also:
Constant Field Values

TYPE

public static final Class<Character> TYPE
The Class object that represents the primitive type char.

Since:
Android 1.0

UNASSIGNED

public static final byte UNASSIGNED
Unicode category constant Cn.

Since:
Android 1.0
See Also:
Constant Field Values

UPPERCASE_LETTER

public static final byte UPPERCASE_LETTER
Unicode category constant Lu.

Since:
Android 1.0
See Also:
Constant Field Values

LOWERCASE_LETTER

public static final byte LOWERCASE_LETTER
Unicode category constant Ll.

Since:
Android 1.0
See Also:
Constant Field Values

TITLECASE_LETTER

public static final byte TITLECASE_LETTER
Unicode category constant Lt.

Since:
Android 1.0
See Also:
Constant Field Values

MODIFIER_LETTER

public static final byte MODIFIER_LETTER
Unicode category constant Lm.

Since:
Android 1.0
See Also:
Constant Field Values

OTHER_LETTER

public static final byte OTHER_LETTER
Unicode category constant Lo.

Since:
Android 1.0
See Also:
Constant Field Values

NON_SPACING_MARK

public static final byte NON_SPACING_MARK
Unicode category constant Mn.

Since:
Android 1.0
See Also:
Constant Field Values

ENCLOSING_MARK

public static final byte ENCLOSING_MARK
Unicode category constant Me.

Since:
Android 1.0
See Also:
Constant Field Values

COMBINING_SPACING_MARK

public static final byte COMBINING_SPACING_MARK
Unicode category constant Mc.

Since:
Android 1.0
See Also:
Constant Field Values

DECIMAL_DIGIT_NUMBER

public static final byte DECIMAL_DIGIT_NUMBER
Unicode category constant Nd.

Since:
Android 1.0
See Also:
Constant Field Values

LETTER_NUMBER

public static final byte LETTER_NUMBER
Unicode category constant Nl.

Since:
Android 1.0
See Also:
Constant Field Values

OTHER_NUMBER

public static final byte OTHER_NUMBER
Unicode category constant No.

Since:
Android 1.0
See Also:
Constant Field Values

SPACE_SEPARATOR

public static final byte SPACE_SEPARATOR
Unicode category constant Zs.

Since:
Android 1.0
See Also:
Constant Field Values

LINE_SEPARATOR

public static final byte LINE_SEPARATOR
Unicode category constant Zl.

Since:
Android 1.0
See Also:
Constant Field Values

PARAGRAPH_SEPARATOR

public static final byte PARAGRAPH_SEPARATOR
Unicode category constant Zp.

Since:
Android 1.0
See Also:
Constant Field Values

CONTROL

public static final byte CONTROL
Unicode category constant Cc.

Since:
Android 1.0
See Also:
Constant Field Values

FORMAT

public static final byte FORMAT
Unicode category constant Cf.

Since:
Android 1.0
See Also:
Constant Field Values

PRIVATE_USE

public static final byte PRIVATE_USE
Unicode category constant Co.

Since:
Android 1.0
See Also:
Constant Field Values

SURROGATE

public static final byte SURROGATE
Unicode category constant Cs.

Since:
Android 1.0
See Also:
Constant Field Values

DASH_PUNCTUATION

public static final byte DASH_PUNCTUATION
Unicode category constant Pd.

Since:
Android 1.0
See Also:
Constant Field Values

START_PUNCTUATION

public static final byte START_PUNCTUATION
Unicode category constant Ps.

Since:
Android 1.0
See Also:
Constant Field Values

END_PUNCTUATION

public static final byte END_PUNCTUATION
Unicode category constant Pe.

Since:
Android 1.0
See Also:
Constant Field Values

CONNECTOR_PUNCTUATION

public static final byte CONNECTOR_PUNCTUATION
Unicode category constant Pc.

Since:
Android 1.0
See Also:
Constant Field Values

OTHER_PUNCTUATION

public static final byte OTHER_PUNCTUATION
Unicode category constant Po.

Since:
Android 1.0
See Also:
Constant Field Values

MATH_SYMBOL

public static final byte MATH_SYMBOL
Unicode category constant Sm.

Since:
Android 1.0
See Also:
Constant Field Values

CURRENCY_SYMBOL

public static final byte CURRENCY_SYMBOL
Unicode category constant Sc.

Since:
Android 1.0
See Also:
Constant Field Values

MODIFIER_SYMBOL

public static final byte MODIFIER_SYMBOL
Unicode category constant Sk.

Since:
Android 1.0
See Also:
Constant Field Values

OTHER_SYMBOL

public static final byte OTHER_SYMBOL
Unicode category constant So.

Since:
Android 1.0
See Also:
Constant Field Values

INITIAL_QUOTE_PUNCTUATION

public static final byte INITIAL_QUOTE_PUNCTUATION
Unicode category constant Pi.

Since:
Android 1.0
See Also:
Constant Field Values

FINAL_QUOTE_PUNCTUATION

public static final byte FINAL_QUOTE_PUNCTUATION
Unicode category constant Pf.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_UNDEFINED

public static final byte DIRECTIONALITY_UNDEFINED
Unicode bidirectional constant.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_LEFT_TO_RIGHT

public static final byte DIRECTIONALITY_LEFT_TO_RIGHT
Unicode bidirectional constant L.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_RIGHT_TO_LEFT

public static final byte DIRECTIONALITY_RIGHT_TO_LEFT
Unicode bidirectional constant R.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC

public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
Unicode bidirectional constant AL.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_EUROPEAN_NUMBER

public static final byte DIRECTIONALITY_EUROPEAN_NUMBER
Unicode bidirectional constant EN.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR

public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
Unicode bidirectional constant ES.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR

public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
Unicode bidirectional constant ET.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_ARABIC_NUMBER

public static final byte DIRECTIONALITY_ARABIC_NUMBER
Unicode bidirectional constant AN.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_COMMON_NUMBER_SEPARATOR

public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
Unicode bidirectional constant CS.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_NONSPACING_MARK

public static final byte DIRECTIONALITY_NONSPACING_MARK
Unicode bidirectional constant NSM.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_BOUNDARY_NEUTRAL

public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL
Unicode bidirectional constant BN.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_PARAGRAPH_SEPARATOR

public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR
Unicode bidirectional constant B.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_SEGMENT_SEPARATOR

public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR
Unicode bidirectional constant S.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_WHITESPACE

public static final byte DIRECTIONALITY_WHITESPACE
Unicode bidirectional constant WS.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_OTHER_NEUTRALS

public static final byte DIRECTIONALITY_OTHER_NEUTRALS
Unicode bidirectional constant ON.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING

public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
Unicode bidirectional constant LRE.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE

public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
Unicode bidirectional constant LRO.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING

public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
Unicode bidirectional constant RLE.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE

public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
Unicode bidirectional constant RLO.

Since:
Android 1.0
See Also:
Constant Field Values

DIRECTIONALITY_POP_DIRECTIONAL_FORMAT

public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
Unicode bidirectional constant PDF.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_HIGH_SURROGATE

public static final char MIN_HIGH_SURROGATE
The minimum value of a high surrogate or leading surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_HIGH_SURROGATE

public static final char MAX_HIGH_SURROGATE
The maximum value of a high surrogate or leading surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_LOW_SURROGATE

public static final char MIN_LOW_SURROGATE
The minimum value of a low surrogate or trailing surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_LOW_SURROGATE

public static final char MAX_LOW_SURROGATE
The maximum value of a low surrogate or trailing surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_SURROGATE

public static final char MIN_SURROGATE
The minimum value of a surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_SURROGATE

public static final char MAX_SURROGATE
The maximum value of a surrogate unit in UTF-16 encoding, '?'.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_SUPPLEMENTARY_CODE_POINT

public static final int MIN_SUPPLEMENTARY_CODE_POINT
The minimum value of a supplementary code point, U+010000.

Since:
Android 1.0
See Also:
Constant Field Values

MIN_CODE_POINT

public static final int MIN_CODE_POINT
The minimum code point value, U+0000.

Since:
Android 1.0
See Also:
Constant Field Values

MAX_CODE_POINT

public static final int MAX_CODE_POINT
The maximum code point value, U+10FFFF.

Since:
Android 1.0
See Also:
Constant Field Values

SIZE

public static final int SIZE
The number of bits required to represent a Character value in two's compliment form.

Since:
Android 1.0
See Also:
Constant Field Values
Constructor Detail

Character

public Character(char value)
Constructs a new Character with the specified primitive char value.

Parameters:
value - the primitive char value to store in the new instance.
Since:
Android 1.0
Method Detail

charValue

public char charValue()
Gets the primitive value of this character.

Returns:
this object's primitive value.
Since:
Android 1.0

compareTo

public int compareTo(Character c)
Compares this object to the specified character object to determine their relative order.

Specified by:
compareTo in interface Comparable<Character>
Parameters:
c - the character object to compare this object to.
Returns:
0 if the value of this character and the value of c are equal; a positive value if the value of this character is greater than the value of c; a negative value if the value of this character is less than the value of c.
Since:
Android 1.0
See Also:
Comparable

valueOf

public static Character valueOf(char c)
Returns a Character instance for the char value passed. For ASCII/Latin-1 characters (and generally all characters with a Unicode value up to 512), this method should be used instead of the constructor, as it maintains a cache of corresponding Character instances.

Parameters:
c - the char value for which to get a Character instance.
Returns:
the Character instance for c.
Since:
Android 1.0

isValidCodePoint

public static boolean isValidCodePoint(int codePoint)
Indicates whether codePoint is a valid Unicode code point.

Parameters:
codePoint - the code point to test.
Returns:
true if codePoint is a valid Unicode code point; false otherwise.
Since:
Android 1.0

isSupplementaryCodePoint

public static boolean isSupplementaryCodePoint(int codePoint)
Indicates whether codePoint is within the supplementary code point range.

Parameters:
codePoint - the code point to test.
Returns:
true if codePoint is within the supplementary code point range; false otherwise.
Since:
Android 1.0

isHighSurrogate

public static boolean isHighSurrogate(char ch)
Indicates whether ch is a high- (or leading-) surrogate code unit that is used for representing supplementary characters in UTF-16 encoding.

Parameters:
ch - the character to test.
Returns:
true if ch is a high-surrogate code unit; false otherwise.
Since:
Android 1.0
See Also:
isLowSurrogate(char)

isLowSurrogate

public static boolean isLowSurrogate(char ch)
Indicates whether ch is a low- (or trailing-) surrogate code unit that is used for representing supplementary characters in UTF-16 encoding.

Parameters:
ch - the character to test.
Returns:
true if ch is a low-surrogate code unit; false otherwise.
Since:
Android 1.0
See Also:
isHighSurrogate(char)

isSurrogatePair

public static boolean isSurrogatePair(char high,
                                      char low)
Indicates whether the specified character pair is a valid surrogate pair.

Parameters:
high - the high surrogate unit to test.
low - the low surrogate unit to test.
Returns:
true if high is a high-surrogate code unit and low is a low-surrogate code unit; false otherwise.
Since:
Android 1.0
See Also:
isHighSurrogate(char), isLowSurrogate(char)

charCount

public static int charCount(int codePoint)
Calculates the number of char values required to represent the specified Unicode code point. This method checks if the codePoint is greater than or equal to 0x10000, in which case 2 is returned, otherwise 1. To test if the code point is valid, use the isValidCodePoint(int) method.

Parameters:
codePoint - the code point for which to calculate the number of required chars.
Returns:
2 if codePoint >= 0x10000; 1 otherwise.
Since:
Android 1.0

toCodePoint

public static int toCodePoint(char high,
                              char low)
Converts a surrogate pair into a Unicode code point. This method assumes that the pair are valid surrogates. If the pair are not valid surrogates, then the result is indeterminate. The isSurrogatePair(char, char) method should be used prior to this method to validate the pair.

Parameters:
high - the high surrogate unit.
low - the low surrogate unit.
Returns:
the Unicode code point corresponding to the surrogate unit pair.
Since:
Android 1.0
See Also:
isSurrogatePair(char, char)

codePointAt

public static int codePointAt(CharSequence seq,
                              int index)
Returns the code point at index in the specified sequence of character units. If the unit at index is a high-surrogate unit, index + 1 is less than the length of the sequence and the unit at index + 1 is a low-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index is returned.

Parameters:
seq - the source sequence of char units.
index - the position in seq from which to retrieve the code point.
Returns:
the Unicode code point or char value at index in seq.
Throws:
IndexOutOfBoundsException - if the index is negative or greater than or equal to the length of seq.
Since:
Android 1.0

codePointAt

public static int codePointAt(char[] seq,
                              int index)
Returns the code point at index in the specified array of character units. If the unit at index is a high-surrogate unit, index + 1 is less than the length of the array and the unit at index + 1 is a low-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index is returned.

Parameters:
seq - the source array of char units.
index - the position in seq from which to retrieve the code point.
Returns:
the Unicode code point or char value at index in seq.
Throws:
IndexOutOfBoundsException - if the index is negative or greater than or equal to the length of seq.
Since:
Android 1.0

codePointAt

public static int codePointAt(char[] seq,
                              int index,
                              int limit)
Returns the code point at index in the specified array of character units, where index has to be less than limit. If the unit at index is a high-surrogate unit, index + 1 is less than limit and the unit at index + 1 is a low-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index is returned.

Parameters:
seq - the source array of char units.
index - the position in seq from which to get the code point.
limit - the index after the last unit in seq that can be used.
Returns:
the Unicode code point or char value at index in seq.
Throws:
IndexOutOfBoundsException - if index < 0, index >= limit, limit < 0 or if limit is greater than the length of seq.
Since:
Android 1.0

codePointBefore

public static int codePointBefore(CharSequence seq,
                                  int index)
Returns the code point that preceds index in the specified sequence of character units. If the unit at index - 1 is a low-surrogate unit, index - 2 is not negative and the unit at index - 2 is a high-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index - 1 is returned.

Parameters:
seq - the source sequence of char units.
index - the position in seq following the code point that should be returned.
Returns:
the Unicode code point or char value before index in seq.
Throws:
IndexOutOfBoundsException - if the index is less than 1 or greater than the length of seq.
Since:
Android 1.0

codePointBefore

public static int codePointBefore(char[] seq,
                                  int index)
Returns the code point that preceds index in the specified array of character units. If the unit at index - 1 is a low-surrogate unit, index - 2 is not negative and the unit at index - 2 is a high-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index - 1 is returned.

Parameters:
seq - the source array of char units.
index - the position in seq following the code point that should be returned.
Returns:
the Unicode code point or char value before index in seq.
Throws:
IndexOutOfBoundsException - if the index is less than 1 or greater than the length of seq.
Since:
Android 1.0

codePointBefore

public static int codePointBefore(char[] seq,
                                  int index,
                                  int start)
Returns the code point that preceds the index in the specified array of character units and is not less than start. If the unit at index - 1 is a low-surrogate unit, index - 2 is not less than start and the unit at index - 2 is a high-surrogate unit, then the supplementary code point represented by the pair is returned; otherwise the char value at index - 1 is returned.

Parameters:
seq - the source array of char units.
index - the position in seq following the code point that should be returned.
start - the index of the first element in seq.
Returns:
the Unicode code point or char value before index in seq.
Throws:
IndexOutOfBoundsException - if the index <= start, start < 0, index is greater than the length of seq, or if start is equal or greater than the length of seq.
Since:
Android 1.0

toChars

public static int toChars(int codePoint,
                          char[] dst,
                          int dstIndex)
Converts the specified Unicode code point into a UTF-16 encoded sequence and copies the value(s) into the char array dst, starting at index dstIndex.

Parameters:
codePoint - the Unicode code point to encode.
dst - the destination array to copy the encoded value into.
dstIndex - the index in dst from where to start copying.
Returns:
the number of char value units copied into dst.
Throws:
IllegalArgumentException - if codePoint is not a valid Unicode code point.
IndexOutOfBoundsException - if dstIndex is negative, greater than or equal to dst.length or equals dst.length - 1 when codePoint is a supplementary code point.
Since:
Android 1.0

toChars

public static char[] toChars(int codePoint)
Converts the specified Unicode code point into a UTF-16 encoded sequence and returns it as a char array.

Parameters:
codePoint - the Unicode code point to encode.
Returns:
the UTF-16 encoded char sequence. If codePoint is a supplementary code point, then the returned array contains two characters, otherwise it contains just one character.
Throws:
IllegalArgumentException - if codePoint is not a valid Unicode code point.
Since:
Android 1.0

codePointCount

public static int codePointCount(CharSequence seq,
                                 int beginIndex,
                                 int endIndex)
Counts the number of Unicode code points in the subsequence of the specified character sequence, as delineated by beginIndex and endIndex. Any surrogate values with missing pair values will be counted as one code point.

Parameters:
seq - the CharSequence to look through.
beginIndex - the inclusive index to begin counting at.
endIndex - the exclusive index to stop counting at.
Returns:
the number of Unicode code points.
Throws:
IndexOutOfBoundsException - if beginIndex < 0, beginIndex > endIndex or if endIndex is greater than the length of seq.
Since:
Android 1.0

codePointCount

public static int codePointCount(char[] seq,
                                 int offset,
                                 int count)
Counts the number of Unicode code points in the subsequence of the specified char array, as delineated by offset and count. Any surrogate values with missing pair values will be counted as one code point.

Parameters:
seq - the char array to look through
offset - the inclusive index to begin counting at.
count - the number of char values to look through in seq.
Returns:
the number of Unicode code points.
Throws:
IndexOutOfBoundsException - if offset < 0, count < 0 or if offset + count is greater than the length of seq.
Since:
Android 1.0

offsetByCodePoints

public static int offsetByCodePoints(CharSequence seq,
                                     int index,
                                     int codePointOffset)
Determines the index in the specified character sequence that is offset codePointOffset code points from index.

Parameters:
seq - the character sequence to find the index in.
index - the start index in seq.
codePointOffset - the number of code points to look backwards or forwards; may be a negative or positive value.
Returns:
the index in seq that is codePointOffset code points away from index.
Throws:
IndexOutOfBoundsException - if index < 0, index is greater than the length of seq, or if there are not enough values in seq to skip codePointOffset code points forwards or backwards (if codePointOffset is negative) from index.
Since:
Android 1.0

offsetByCodePoints

public static int offsetByCodePoints(char[] seq,
                                     int start,
                                     int count,
                                     int index,
                                     int codePointOffset)
Determines the index in a subsequence of the specified character array that is offset codePointOffset code points from index. The subsequence is delineated by start and count.

Parameters:
seq - the character array to find the index in.
start - the inclusive index that marks the beginning of the subsequence.
count - the number of char values to include within the subsequence.
index - the start index in the subsequence of the char array.
codePointOffset - the number of code points to look backwards or forwards; may be a negative or positive value.
Returns:
the index in seq that is codePointOffset code points away from index.
Throws:
IndexOutOfBoundsException - if start < 0, count < 0, index < start, index > start + count, start + count is greater than the length of seq, or if there are not enough values in seq to skip codePointOffset code points forward or backward (if codePointOffset is negative) from index.
Since:
Android 1.0

digit

public static int digit(char c,
                        int radix)
Convenience method to determine the value of the specified character c in the supplied radix. The value of radix must be between MIN_RADIX and MAX_RADIX.

Parameters:
c - the character to determine the value of.
radix - the radix.
Returns:
the value of c in radix if radix lies between MIN_RADIX and MAX_RADIX; -1 otherwise.
Since:
Android 1.0

digit

public static int digit(int codePoint,
                        int radix)
Convenience method to determine the value of the character codePoint in the supplied radix. The value of radix must be between MIN_RADIX and MAX_RADIX.

Parameters:
codePoint - the character, including supplementary characters.
radix - the radix.
Returns:
if radix lies between MIN_RADIX and MAX_RADIX then the value of the character in the radix; -1 otherwise.
Since:
Android 1.0

equals

public boolean equals(Object object)
Compares this object with the specified object and indicates if they are equal. In order to be equal, object must be an instance of Character and have the same char value as this object.

Overrides:
equals in class Object
Parameters:
object - the object to compare this double with.
Returns:
true if the specified object is equal to this Character; false otherwise.
Since:
Android 1.0
See Also:
Object.hashCode()

forDigit

public static char forDigit(int digit,
                            int radix)
Returns the character which represents the specified digit in the specified radix. The radix must be between MIN_RADIX and MAX_RADIX inclusive; digit must not be negative and smaller than radix. If any of these conditions does not hold, 0 is returned.

Parameters:
digit - the integer value.
radix - the radix.
Returns:
the character which represents the digit in the radix.
Since:
Android 1.0

getNumericValue

public static int getNumericValue(char c)
Gets the numeric value of the specified Unicode character.

Parameters:
c - the Unicode character to get the numeric value of.
Returns:
a non-negative numeric integer value if a numeric value for c exists, -1 if there is no numeric value for c, -2 if the numeric value can not be represented with an integer.
Since:
Android 1.0

getNumericValue

public static int getNumericValue(int codePoint)
Gets the numeric value of the specified Unicode code point. For example, the code point 'Ⅻ' stands for the Roman number XII, which has the numeric value 12.

Parameters:
codePoint - the Unicode code point to get the numeric value of.
Returns:
a non-negative numeric integer value if a numeric value for codePoint exists, -1 if there is no numeric value for codePoint, -2 if the numeric value can not be represented with an integer.
Since:
Android 1.0

getType

public static int getType(char c)
Gets the general Unicode category of the specified character.

Parameters:
c - the character to get the category of.
Returns:
the Unicode category of c.
Since:
Android 1.0

getType

public static int getType(int codePoint)
Gets the general Unicode category of the specified code point.

Parameters:
codePoint - the Unicode code point to get the category of.
Returns:
the Unicode category of codePoint.
Since:
Android 1.0

getDirectionality

public static byte getDirectionality(char c)
Gets the Unicode directionality of the specified character.

Parameters:
c - the character to get the directionality of.
Returns:
the Unicode directionality of c.
Since:
Android 1.0

getDirectionality

public static byte getDirectionality(int codePoint)
Gets the Unicode directionality of the specified character.

Parameters:
codePoint - the Unicode code point to get the directionality of.
Returns:
the Unicode directionality of codePoint.
Since:
Android 1.0

isMirrored

public static boolean isMirrored(char c)
Indicates whether the specified character is mirrored.

Parameters:
c - the character to check.
Returns:
true if c is mirrored; false otherwise.
Since:
Android 1.0

isMirrored

public static boolean isMirrored(int codePoint)
Indicates whether the specified code point is mirrored.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is mirrored, false otherwise.
Since:
Android 1.0

hashCode

public int hashCode()
Description copied from class: Object
Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Overrides:
hashCode in class Object
Returns:
this object's hash code.
See Also:
Object.equals(java.lang.Object)

isDefined

public static boolean isDefined(char c)
Indicates whether the specified character is defined in the Unicode specification.

Parameters:
c - the character to check.
Returns:
true if the general Unicode category of the character is not UNASSIGNED; false otherwise.
Since:
Android 1.0

isDefined

public static boolean isDefined(int codePoint)
Indicates whether the specified code point is defined in the Unicode specification.

Parameters:
codePoint - the code point to check.
Returns:
true if the general Unicode category of the code point is not UNASSIGNED; false otherwise.
Since:
Android 1.0

isDigit

public static boolean isDigit(char c)
Indicates whether the specified character is a digit.

Parameters:
c - the character to check.
Returns:
true if c is a digit; false otherwise.
Since:
Android 1.0

isDigit

public static boolean isDigit(int codePoint)
Indicates whether the specified code point is a digit.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a digit; false otherwise.
Since:
Android 1.0

isIdentifierIgnorable

public static boolean isIdentifierIgnorable(char c)
Indicates whether the specified character is ignorable in a Java or Unicode identifier.

Parameters:
c - the character to check.
Returns:
true if c is ignorable; false otherwise.
Since:
Android 1.0

isIdentifierIgnorable

public static boolean isIdentifierIgnorable(int codePoint)
Indicates whether the specified code point is ignorable in a Java or Unicode identifier.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is ignorable; false otherwise.
Since:
Android 1.0

isISOControl

public static boolean isISOControl(char c)
Indicates whether the specified character is an ISO control character.

Parameters:
c - the character to check.
Returns:
true if c is an ISO control character; false otherwise.
Since:
Android 1.0

isISOControl

public static boolean isISOControl(int c)
Indicates whether the specified code point is an ISO control character.

Parameters:
c - the code point to check.
Returns:
true if c is an ISO control character; false otherwise.
Since:
Android 1.0

isJavaIdentifierPart

public static boolean isJavaIdentifierPart(char c)
Indicates whether the specified character is a valid part of a Java identifier other than the first character.

Parameters:
c - the character to check.
Returns:
true if c is valid as part of a Java identifier; false otherwise.
Since:
Android 1.0

isJavaIdentifierPart

public static boolean isJavaIdentifierPart(int codePoint)
Indicates whether the specified code point is a valid part of a Java identifier other than the first character.

Parameters:
codePoint - the code point to check.
Returns:
true if c is valid as part of a Java identifier; false otherwise.
Since:
Android 1.0

isJavaIdentifierStart

public static boolean isJavaIdentifierStart(char c)
Indicates whether the specified character is a valid first character for a Java identifier.

Parameters:
c - the character to check.
Returns:
true if c is a valid first character of a Java identifier; false otherwise.
Since:
Android 1.0

isJavaIdentifierStart

public static boolean isJavaIdentifierStart(int codePoint)
Indicates whether the specified code point is a valid start for a Java identifier.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a valid start of a Java identifier; false otherwise.
Since:
Android 1.0

isJavaLetter

@Deprecated
public static boolean isJavaLetter(char c)
Deprecated. Use isJavaIdentifierStart(char)

Indicates whether the specified character is a Java letter.

Parameters:
c - the character to check.
Returns:
true if c is a Java letter; false otherwise.
Since:
Android 1.0

isJavaLetterOrDigit

@Deprecated
public static boolean isJavaLetterOrDigit(char c)
Deprecated. Use isJavaIdentifierPart(char)

Indicates whether the specified character is a Java letter or digit character.

Parameters:
c - the character to check.
Returns:
true if c is a Java letter or digit; false otherwise.
Since:
Android 1.0

isLetter

public static boolean isLetter(char c)
Indicates whether the specified character is a letter.

Parameters:
c - the character to check.
Returns:
true if c is a letter; false otherwise.
Since:
Android 1.0

isLetter

public static boolean isLetter(int codePoint)
Indicates whether the specified code point is a letter.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a letter; false otherwise.
Since:
Android 1.0

isLetterOrDigit

public static boolean isLetterOrDigit(char c)
Indicates whether the specified character is a letter or a digit.

Parameters:
c - the character to check.
Returns:
true if c is a letter or a digit; false otherwise.
Since:
Android 1.0

isLetterOrDigit

public static boolean isLetterOrDigit(int codePoint)
Indicates whether the specified code point is a letter or a digit.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a letter or a digit; false otherwise.
Since:
Android 1.0

isLowerCase

public static boolean isLowerCase(char c)
Indicates whether the specified character is a lower case letter.

Parameters:
c - the character to check.
Returns:
true if c is a lower case letter; false otherwise.
Since:
Android 1.0

isLowerCase

public static boolean isLowerCase(int codePoint)
Indicates whether the specified code point is a lower case letter.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a lower case letter; false otherwise.
Since:
Android 1.0

isSpace

@Deprecated
public static boolean isSpace(char c)
Deprecated. Use isWhitespace(char)

Indicates whether the specified character is a Java space.

Parameters:
c - the character to check.
Returns:
true if c is a Java space; false otherwise.
Since:
Android 1.0

isSpaceChar

public static boolean isSpaceChar(char c)
Indicates whether the specified character is a Unicode space character. That is, if it is a member of one of the Unicode categories Space Separator, Line Separator, or Paragraph Separator.

Parameters:
c - the character to check.
Returns:
true if c is a Unicode space character, false otherwise.
Since:
Android 1.0

isSpaceChar

public static boolean isSpaceChar(int codePoint)
Indicates whether the specified code point is a Unicode space character. That is, if it is a member of one of the Unicode categories Space Separator, Line Separator, or Paragraph Separator.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a Unicode space character, false otherwise.
Since:
Android 1.0

isTitleCase

public static boolean isTitleCase(char c)
Indicates whether the specified character is a titlecase character.

Parameters:
c - the character to check.
Returns:
true if c is a titlecase character, false otherwise.
Since:
Android 1.0

isTitleCase

public static boolean isTitleCase(int codePoint)
Indicates whether the specified code point is a titlecase character.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a titlecase character, false otherwise.
Since:
Android 1.0

isUnicodeIdentifierPart

public static boolean isUnicodeIdentifierPart(char c)
Indicates whether the specified character is valid as part of a Unicode identifier other than the first character.

Parameters:
c - the character to check.
Returns:
true if c is valid as part of a Unicode identifier; false otherwise.
Since:
Android 1.0

isUnicodeIdentifierPart

public static boolean isUnicodeIdentifierPart(int codePoint)
Indicates whether the specified code point is valid as part of a Unicode identifier other than the first character.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is valid as part of a Unicode identifier; false otherwise.
Since:
Android 1.0

isUnicodeIdentifierStart

public static boolean isUnicodeIdentifierStart(char c)
Indicates whether the specified character is a valid initial character for a Unicode identifier.

Parameters:
c - the character to check.
Returns:
true if c is a valid first character for a Unicode identifier; false otherwise.
Since:
Android 1.0

isUnicodeIdentifierStart

public static boolean isUnicodeIdentifierStart(int codePoint)
Indicates whether the specified code point is a valid initial character for a Unicode identifier.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a valid first character for a Unicode identifier; false otherwise.
Since:
Android 1.0

isUpperCase

public static boolean isUpperCase(char c)
Indicates whether the specified character is an upper case letter.

Parameters:
c - the character to check.
Returns:
true if c is a upper case letter; false otherwise.
Since:
Android 1.0

isUpperCase

public static boolean isUpperCase(int codePoint)
Indicates whether the specified code point is an upper case letter.

Parameters:
codePoint - the code point to check.
Returns:
true if codePoint is a upper case letter; false otherwise.
Since:
Android 1.0

isWhitespace

public static boolean isWhitespace(char c)
Indicates whether the specified character is a whitespace character in Java.

Parameters:
c - the character to check.
Returns:
true if the supplied c is a whitespace character in Java; false otherwise.
Since:
Android 1.0

isWhitespace

public static boolean isWhitespace(int codePoint)
Indicates whether the specified code point is a whitespace character in Java.

Parameters:
codePoint - the code point to check.
Returns:
true if the supplied c is a whitespace character in Java; false otherwise.
Since:
Android 1.0

reverseBytes

public static char reverseBytes(char c)
Reverses the order of the first and second byte in the specified character.

Parameters:
c - the character to reverse.
Returns:
the character with reordered bytes.
Since:
Android 1.0

toLowerCase

public static char toLowerCase(char c)
Returns the lower case equivalent for the specified character if the character is an upper case letter. Otherwise, the specified character is returned unchanged.

Parameters:
c - the character
Returns:
if c is an upper case character then its lower case counterpart, otherwise just c.
Since:
Android 1.0

toLowerCase

public static int toLowerCase(int codePoint)
Returns the lower case equivalent for the specified code point if it is an upper case letter. Otherwise, the specified code point is returned unchanged.

Parameters:
codePoint - the code point to check.
Returns:
if codePoint is an upper case character then its lower case counterpart, otherwise just codePoint.
Since:
Android 1.0

toString

public String toString()
Description copied from class: Object
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation simply concatenates the class name, the '@' sign and a hexadecimal representation of the object's Object.hashCode(), that is, it is equivalent to the following expression:
 getClass().getName() + '@' + Integer.toHexString(hashCode())
 

Overrides:
toString in class Object
Returns:
a printable representation of this object.

toString

public static String toString(char value)
Converts the specified character to its string representation.

Parameters:
value - the character to convert.
Returns:
the character converted to a string.
Since:
Android 1.0

toTitleCase

public static char toTitleCase(char c)
Returns the title case equivalent for the specified character if it exists. Otherwise, the specified character is returned unchanged.

Parameters:
c - the character to convert.
Returns:
the title case equivalent of c if it exists, otherwise c.
Since:
Android 1.0

toTitleCase

public static int toTitleCase(int codePoint)
Returns the title case equivalent for the specified code point if it exists. Otherwise, the specified code point is returned unchanged.

Parameters:
codePoint - the code point to convert.
Returns:
the title case equivalent of codePoint if it exists, otherwise codePoint.
Since:
Android 1.0

toUpperCase

public static char toUpperCase(char c)
Returns the upper case equivalent for the specified character if the character is a lower case letter. Otherwise, the specified character is returned unchanged.

Parameters:
c - the character to convert.
Returns:
if c is a lower case character then its upper case counterpart, otherwise just c.
Since:
Android 1.0

toUpperCase

public static int toUpperCase(int codePoint)
Returns the upper case equivalent for the specified code point if the code point is a lower case letter. Otherwise, the specified code point is returned unchanged.

Parameters:
codePoint - the code point to convert.
Returns:
if codePoint is a lower case character then its upper case counterpart, otherwise just codePoint.
Since:
Android 1.0

Build 1.1_r1 (from source)

Please submit a feedback, bug or feature