java.lang.Object | ||
java.lang.Character | Serializable Comparable<T> |
Character is the wrapper for the primitive type char
. This
class also provides a number of utility methods for working with
char
s.
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.
Character.Subset | |
Character.UnicodeBlock | Blocks of characters, as defined by the Unicode 4.0.1 specification. |
Value | ||||
---|---|---|---|---|
byte | COMBINING_SPACING_MARK | Unicode category constant Mc. | 8 | 0x00000008 |
byte | CONNECTOR_PUNCTUATION | Unicode category constant Pc. | 23 | 0x00000017 |
byte | CONTROL | Unicode category constant Cc. | 15 | 0x0000000f |
byte | CURRENCY_SYMBOL | Unicode category constant Sc. | 26 | 0x0000001a |
byte | DASH_PUNCTUATION | Unicode category constant Pd. | 20 | 0x00000014 |
byte | DECIMAL_DIGIT_NUMBER | Unicode category constant Nd. | 9 | 0x00000009 |
byte | DIRECTIONALITY_ARABIC_NUMBER | Unicode bidirectional constant AN. | 6 | 0x00000006 |
byte | DIRECTIONALITY_BOUNDARY_NEUTRAL | Unicode bidirectional constant BN. | 9 | 0x00000009 |
byte | DIRECTIONALITY_COMMON_NUMBER_SEPARATOR | Unicode bidirectional constant CS. | 7 | 0x00000007 |
byte | DIRECTIONALITY_EUROPEAN_NUMBER | Unicode bidirectional constant EN. | 3 | 0x00000003 |
byte | DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR | Unicode bidirectional constant ES. | 4 | 0x00000004 |
byte | DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR | Unicode bidirectional constant ET. | 5 | 0x00000005 |
byte | DIRECTIONALITY_LEFT_TO_RIGHT | Unicode bidirectional constant L. | 0 | 0x00000000 |
byte | DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING | Unicode bidirectional constant LRE. | 14 | 0x0000000e |
byte | DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE | Unicode bidirectional constant LRO. | 15 | 0x0000000f |
byte | DIRECTIONALITY_NONSPACING_MARK | Unicode bidirectional constant NSM. | 8 | 0x00000008 |
byte | DIRECTIONALITY_OTHER_NEUTRALS | Unicode bidirectional constant ON. | 13 | 0x0000000d |
byte | DIRECTIONALITY_PARAGRAPH_SEPARATOR | Unicode bidirectional constant B. | 10 | 0x0000000a |
byte | DIRECTIONALITY_POP_DIRECTIONAL_FORMAT | Unicode bidirectional constant PDF. | 18 | 0x00000012 |
byte | DIRECTIONALITY_RIGHT_TO_LEFT | Unicode bidirectional constant R. | 1 | 0x00000001 |
byte | DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC | Unicode bidirectional constant AL. | 2 | 0x00000002 |
byte | DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING | Unicode bidirectional constant RLE. | 16 | 0x00000010 |
byte | DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE | Unicode bidirectional constant RLO. | 17 | 0x00000011 |
byte | DIRECTIONALITY_SEGMENT_SEPARATOR | Unicode bidirectional constant S. | 11 | 0x0000000b |
byte | DIRECTIONALITY_UNDEFINED | Unicode bidirectional constant. | -1 | 0xffffffff |
byte | DIRECTIONALITY_WHITESPACE | Unicode bidirectional constant WS. | 12 | 0x0000000c |
byte | ENCLOSING_MARK | Unicode category constant Me. | 7 | 0x00000007 |
byte | END_PUNCTUATION | Unicode category constant Pe. | 22 | 0x00000016 |
byte | FINAL_QUOTE_PUNCTUATION | Unicode category constant Pf. | 30 | 0x0000001e |
byte | FORMAT | Unicode category constant Cf. | 16 | 0x00000010 |
byte | INITIAL_QUOTE_PUNCTUATION | Unicode category constant Pi. | 29 | 0x0000001d |
byte | LETTER_NUMBER | Unicode category constant Nl. | 10 | 0x0000000a |
byte | LINE_SEPARATOR | Unicode category constant Zl. | 13 | 0x0000000d |
byte | LOWERCASE_LETTER | Unicode category constant Ll. | 2 | 0x00000002 |
byte | MATH_SYMBOL | Unicode category constant Sm. | 25 | 0x00000019 |
int | MAX_CODE_POINT |
Maximum code point value - |
1114111 | 0x0010ffff |
char | MAX_HIGH_SURROGATE |
Maximum value of a high surrogate or leading surrogate unit in UTF-16
encoding - |
56319 | 0x0000dbff |
char | MAX_LOW_SURROGATE | Maximum value of a low surrogate or trailing surrogate unit in UTF-16
encoding - '?' . |
57343 | 0x0000dfff |
int | MAX_RADIX | The maximum possible radix used for conversions between Characters and integers. | 36 | 0x00000024 |
char | MAX_SURROGATE |
Maximum value of a surrogate unit in UTF-16 encoding - |
57343 | 0x0000dfff |
char | MAX_VALUE | The maximum possible Character value. | 65535 | 0x0000ffff |
int | MIN_CODE_POINT |
Minimum code point value - |
0 | 0x00000000 |
char | MIN_HIGH_SURROGATE |
Minimum value of a high surrogate or leading surrogate unit in UTF-16
encoding - |
55296 | 0x0000d800 |
char | MIN_LOW_SURROGATE |
Minimum value of a low surrogate or trailing surrogate unit in UTF-16
encoding - |
56320 | 0x0000dc00 |
int | MIN_RADIX | The minimum possible radix used for conversions between Characters and integers. | 2 | 0x00000002 |
int | MIN_SUPPLEMENTARY_CODE_POINT |
Minimum value of a supplementary code point - |
65536 | 0x00010000 |
char | MIN_SURROGATE |
Minimum value of a surrogate unit in UTF-16 encoding - |
55296 | 0x0000d800 |
char | MIN_VALUE | The minimum possible Character value. | 0 | 0x00000000 |
byte | MODIFIER_LETTER | Unicode category constant Lm. | 4 | 0x00000004 |
byte | MODIFIER_SYMBOL | Unicode category constant Sk. | 27 | 0x0000001b |
byte | NON_SPACING_MARK | Unicode category constant Mn. | 6 | 0x00000006 |
byte | OTHER_LETTER | Unicode category constant Lo. | 5 | 0x00000005 |
byte | OTHER_NUMBER | Unicode category constant No. | 11 | 0x0000000b |
byte | OTHER_PUNCTUATION | Unicode category constant Po. | 24 | 0x00000018 |
byte | OTHER_SYMBOL | Unicode category constant So. | 28 | 0x0000001c |
byte | PARAGRAPH_SEPARATOR | Unicode category constant Zp. | 14 | 0x0000000e |
byte | PRIVATE_USE | Unicode category constant Co. | 18 | 0x00000012 |
int | SIZE |
Constant for the number of bits to represent a |
16 | 0x00000010 |
byte | SPACE_SEPARATOR | Unicode category constant Zs. | 12 | 0x0000000c |
byte | START_PUNCTUATION | Unicode category constant Ps. | 21 | 0x00000015 |
byte | SURROGATE | Unicode category constant Cs. | 19 | 0x00000013 |
byte | TITLECASE_LETTER | Unicode category constant Lt. | 3 | 0x00000003 |
Class<Character> | TYPE | The char Class object. |
||
byte | UNASSIGNED | Unicode category constant Cn. | 0 | 0x00000000 |
byte | UPPERCASE_LETTER | Unicode category constant Lu. | 1 | 0x00000001 |
Character(char value) | ||||||
Constructs a new instance of the receiver which represents the char valued argument. |
static | int | charCount(int codePoint) | ||||
Calculates the number of |
||||||
char | charValue() | |||||
Returns the char value which the receiver represents. | ||||||
static | int | codePointAt(char[] seq, int index) | ||||
Returns the code point at the index in the |
||||||
static | int | codePointAt(CharSequence seq, int index) | ||||
Returns the code point at the index in the |
||||||
static | int | codePointAt(char[] seq, int index, int limit) | ||||
Returns the code point at the index in the |
||||||
static | int | codePointBefore(CharSequence seq, int index) | ||||
Returns the Unicode code point that proceeds the |
||||||
static | int | codePointBefore(char[] seq, int index) | ||||
Returns the Unicode code point that proceeds the |
||||||
static | int | codePointBefore(char[] seq, int index, int start) | ||||
Returns the Unicode code point that proceeds the |
||||||
static | int | codePointCount(CharSequence seq, int beginIndex, int endIndex) | ||||
Counts the number of Unicode code points in the subsequence of the
|
||||||
static | int | codePointCount(char[] seq, int offset, int count) | ||||
Counts the number of Unicode code points in the subsequence of the
|
||||||
int | compareTo(Character c) | |||||
Compares the receiver to the specified Character to determine the relative ordering. | ||||||
static | int | digit(int codePoint, int radix) | ||||
Convenient method to determine the value of character
codePoint in the supplied radix. |
||||||
static | int | digit(char c, int radix) | ||||
Convenient method to determine the value of character c in
the supplied radix. |
||||||
boolean | equals(Object object) | |||||
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. | ||||||
static | char | forDigit(int digit, int radix) | ||||
Returns the character which represents the value in the specified radix. | ||||||
static | byte | getDirectionality(int codePoint) | ||||
Gets the Unicode directionality of the specified character. | ||||||
static | byte | getDirectionality(char c) | ||||
Gets the Unicode directionality of the specified character. | ||||||
static | int | getNumericValue(int codePoint) | ||||
Gets the numeric value of the Unicode character. | ||||||
static | int | getNumericValue(char c) | ||||
Gets the numeric value of the Unicode character. | ||||||
static | int | getType(int codePoint) | ||||
Gets the general Unicode category of the specified character. | ||||||
static | int | getType(char c) | ||||
Gets the general Unicode category of the specified character. | ||||||
int | hashCode() | |||||
Returns an integer hash code for the receiver. | ||||||
static | boolean | isDefined(char c) | ||||
Returns whether the specified character is defined in the Unicode specification. | ||||||
static | boolean | isDefined(int codePoint) | ||||
Returns whether the specified character is defined in the Unicode specification. | ||||||
static | boolean | isDigit(int codePoint) | ||||
Returns whether the character is a digit. | ||||||
static | boolean | isDigit(char c) | ||||
Returns whether the character is a digit. | ||||||
static | boolean | isHighSurrogate(char ch) | ||||
A test for determining if the |
||||||
static | boolean | isISOControl(char c) | ||||
Returns whether the character is an ISO control character. | ||||||
static | boolean | isISOControl(int c) | ||||
Returns whether the character is an ISO control character. | ||||||
static | boolean | isIdentifierIgnorable(int codePoint) | ||||
Returns whether the specified character is ignorable in a Java or Unicode identifier. | ||||||
static | boolean | isIdentifierIgnorable(char c) | ||||
Returns whether the specified character is ignorable in a Java or Unicode identifier. | ||||||
static | boolean | isJavaIdentifierPart(int codePoint) | ||||
Returns whether the character is a valid part of a Unicode identifier as other than the first character. | ||||||
static | boolean | isJavaIdentifierPart(char c) | ||||
Returns whether the character is a valid part of a Unicode identifier as other than the first character. | ||||||
static | boolean | isJavaIdentifierStart(char c) | ||||
Returns whether the character is a valid start of a Unicode identifier | ||||||
static | boolean | isJavaIdentifierStart(int codePoint) | ||||
Returns whether the character is a valid start of a Unicode identifier | ||||||
static | boolean | isJavaLetter(char c) | ||||
This method is deprecated. Use isJavaIdentifierStart(char) | ||||||
static | boolean | isJavaLetterOrDigit(char c) | ||||
This method is deprecated. Use isJavaIdentifierPart(char) | ||||||
static | boolean | isLetter(int codePoint) | ||||
Returns whether the character is a letter. | ||||||
static | boolean | isLetter(char c) | ||||
Returns whether the character is a letter. | ||||||
static | boolean | isLetterOrDigit(int codePoint) | ||||
Returns whether the character is a letter or a digit. | ||||||
static | boolean | isLetterOrDigit(char c) | ||||
Returns whether the character is a letter or a digit. | ||||||
static | boolean | isLowSurrogate(char ch) | ||||
A test for determining if the |
||||||
static | boolean | isLowerCase(char c) | ||||
Returns whether the character is a lower case letter. | ||||||
static | boolean | isLowerCase(int codePoint) | ||||
Returns whether the character is a lower case letter. | ||||||
static | boolean | isMirrored(char c) | ||||
Returns whether the specified character is mirrored | ||||||
static | boolean | isMirrored(int codePoint) | ||||
Returns whether the specified character is mirrored | ||||||
static | boolean | isSpace(char c) | ||||
This method is deprecated. Use isWhitespace(char) | ||||||
static | boolean | isSpaceChar(char c) | ||||
Returns whether the character is a Unicode space character. | ||||||
static | boolean | isSpaceChar(int codePoint) | ||||
Returns whether the character is a Unicode space character. | ||||||
static | boolean | isSupplementaryCodePoint(int codePoint) | ||||
A test for determining if the |
||||||
static | boolean | isSurrogatePair(char high, char low) | ||||
A test for determining if the |
||||||
static | boolean | isTitleCase(int codePoint) | ||||
Returns whether the character is a titlecase character. | ||||||
static | boolean | isTitleCase(char c) | ||||
Returns whether the character is a titlecase character. | ||||||
static | boolean | isUnicodeIdentifierPart(char c) | ||||
Returns whether the character is valid as part of a Unicode identifier as other than the first character. | ||||||
static | boolean | isUnicodeIdentifierPart(int codePoint) | ||||
Returns whether the character is valid as part of a Unicode identifier as other than the first character. | ||||||
static | boolean | isUnicodeIdentifierStart(int codePoint) | ||||
Returns whether the character is a valid initial character for a Unicode identifier. | ||||||
static | boolean | isUnicodeIdentifierStart(char c) | ||||
Returns whether the character is a valid initial character for a Unicode identifier. | ||||||
static | boolean | isUpperCase(char c) | ||||
Returns whether the character is an upper case letter. | ||||||
static | boolean | isUpperCase(int codePoint) | ||||
Returns whether the character is an upper case letter. | ||||||
static | boolean | isValidCodePoint(int codePoint) | ||||
A test for determining if the |
||||||
static | boolean | isWhitespace(int codePoint) | ||||
Returns whether the character is a whitespace character in Java. | ||||||
static | boolean | isWhitespace(char c) | ||||
Returns whether the character is a whitespace character in Java. | ||||||
static | int | offsetByCodePoints(char[] seq, int start, int count, int index, int codePointOffset) | ||||
Determines the index into the |
||||||
static | int | offsetByCodePoints(CharSequence seq, int index, int codePointOffset) | ||||
Determines the index into the |
||||||
static | char | reverseBytes(char c) | ||||
Reverse the order of the first and second bytes in character | ||||||
static | char[] | toChars(int codePoint) | ||||
Converts the Unicode code point, |
||||||
static | int | toChars(int codePoint, char[] dst, int dstIndex) | ||||
Converts the Unicode code point, |
||||||
static | int | toCodePoint(char high, char low) | ||||
Converts a surrogate pair into a Unicode code point. |
||||||
static | int | toLowerCase(int codePoint) | ||||
Returns the lower case equivalent for the character when the character is an upper case letter, otherwise returns the character. | ||||||
static | char | toLowerCase(char c) | ||||
Returns the lower case equivalent for the character when the character is an upper case letter, otherwise returns the character. | ||||||
static | String | toString(char value) | ||||
Converts the specified character to its string representation. | ||||||
String | toString() | |||||
Returns a string containing a concise, human-readable description of the receiver. | ||||||
static | int | toTitleCase(int codePoint) | ||||
Returns the title case equivalent for the character, otherwise returns the character. | ||||||
static | char | toTitleCase(char c) | ||||
Returns the title case equivalent for the character, otherwise returns the character. | ||||||
static | char | toUpperCase(char c) | ||||
Returns the upper case equivalent for the character when the character is a lower case letter, otherwise returns the character. | ||||||
static | int | toUpperCase(int codePoint) | ||||
Returns the upper case equivalent for the character when the character is a lower case letter, otherwise returns the character. | ||||||
static | Character | valueOf(char c) | ||||
Returns a |
Maximum code point value - U+10FFFF
.
Maximum value of a high surrogate or leading surrogate unit in UTF-16
encoding - '?'
.
'?'
.
Maximum value of a surrogate unit in UTF-16 encoding - '?'
.
Minimum code point value - U+0000
.
Minimum value of a high surrogate or leading surrogate unit in UTF-16
encoding - '?'
.
Minimum value of a low surrogate or trailing surrogate unit in UTF-16
encoding - '?'
.
Minimum value of a supplementary code point - U+010000
.
Minimum value of a surrogate unit in UTF-16 encoding - '?'
.
Constant for the number of bits to represent a char
in
two's compliment form.
value | the char to store in the new instance. |
---|
Calculates the number of char
values required to represent
the Unicode code point. This method only tests 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.
codePoint | The code point to test. |
---|
int
value of 2 or 1.
Returns the code point at the index in the char[]
. If
char
unit at the index is a high-surrogate unit, the next
index is less than the length of the sequence and the char
unit at the next index is a low surrogate unit, then the code point
represented by the pair is returned; otherwise the char
unit at the index is returned.
seq | The sequence of char units. |
---|---|
index | The index into the seq to retrieve and
convert. |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if the index is negative
or greater than or equal to seq.length() . |
Returns the code point at the index in the CharSequence
.
If char
unit at the index is a high-surrogate unit, the
next index is less than the length of the sequence and the
char
unit at the next index is a low surrogate unit, then
the code point represented by the pair is returned; otherwise the
char
unit at the index is returned.
seq | The sequence of char units. |
---|---|
index | The index into the seq to retrieve and
convert. |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if the index is negative
or greater than or equal to seq.length() . |
Returns the code point at the index in the char[]
that's
within the limit. If char
unit at the index is a
high-surrogate unit, the next index is less than the limit
and the char
unit at the next index is a low surrogate
unit, then the code point represented by the pair is returned; otherwise
the char
unit at the index is returned.
seq | The sequence of char units. |
---|---|
index | The index into the seq to retrieve and
convert. |
limit | The exclusive index into the seq that marks
the end of the units that can be used. |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if the index is
negative, greater than or equal to limit ,
limit is negative or limit is
greater than the length of seq . |
Returns the Unicode code point that proceeds the index
in
the CharSequence
. If the char
unit at
index - 1
is within the low surrogate range, the value
index - 2
isn't negative and the char
unit
at index - 2
is within the high surrogate range, then the
supplementary code point made up of the surrogate pair is returned;
otherwise, the char
value at index - 1
is
returned.
seq | The CharSequence to search. |
---|---|
index | The index into the seq . |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if index is less than 1
or greater than seq.length() . |
Returns the Unicode code point that proceeds the index
in
the char[]
. If the char
unit at
index - 1
is within the low surrogate range, the value
index - 2
isn't negative and the char
unit
at index - 2
is within the high surrogate range, then the
supplementary code point made up of the surrogate pair is returned;
otherwise, the char
value at index - 1
is
returned.
seq | The char[] to search. |
---|---|
index | The index into the seq . |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if index is less than 1
or greater than seq.length . |
Returns the Unicode code point that proceeds the index
in
the char[]
and isn't less than start
. If
the char
unit at index - 1
is within the
low surrogate range, the value index - 2
isn't less than
start
and the char
unit at
index - 2
is within the high surrogate range, then the
supplementary code point made up of the surrogate pair is returned;
otherwise, the char
value at index - 1
is
returned.
seq | The char[] to search. |
---|---|
index | The index into the seq . |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if index is less than or
equal to start , index is greater
than seq.length , start is not
negative and start is greater than
seq.length . |
Counts the number of Unicode code points in the subsequence of the
CharSequence
, as delineated by the
beginIndex
and endIndex
. Any surrogate
values with missing pair values will be counted as 1 code point.
seq | The CharSequence to look through. |
---|---|
beginIndex | The inclusive index to begin counting at. |
endIndex | The exclusive index to stop counting at. |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if beginIndex is
negative, greater than seq.length() or greater
than endIndex . |
Counts the number of Unicode code points in the subsequence of the
char[]
, as delineated by the offset
and
count
. Any surrogate values with missing pair values will
be counted as 1 code point.
seq | The char[] to look through. |
---|---|
offset | The inclusive index to begin counting at. |
count | The number of char values to look through in
seq . |
NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if offset or
count is negative or if endIndex is
greater than seq.length . |
c | the Character |
---|
NullPointerException | if c is null . |
---|
codePoint
in the supplied radix. The value of
radix
must be between MIN_RADIX and MAX_RADIX.
codePoint | the character, including supplementary characters |
---|---|
radix | the radix |
In this case, the argument must also be a Character, and the receiver and argument must represent the same char value.
object | the object to compare with this object |
---|
true
if the object is the same as this object
false
if it is different from this objectdigit | the integer value |
---|---|
radix | the radix |
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
true
when passed to equals
must
answer the same value for this method.
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
A test for determining if the char
is a high
surrogate/leading surrogate unit that's used for representing
supplementary characters in UTF-16 encoding.
ch | The char unit to test. |
---|
c | the character |
---|
true
if c
is an ISO control
character, otherwise false
c | the character, including supplementary characters |
---|
true
if c
is an ISO control
character, otherwise false
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
This method is deprecated. Use isJavaIdentifierStart(char)
Returns whether the character is a Java letter.
This method is deprecated. Use isJavaIdentifierPart(char)
Returns whether the character is a Java letter or digit character.codePoint | the character, including supplementary characters |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
A test for determining if the char
is a high
surrogate/leading surrogate unit that's used for representing
supplementary characters in UTF-16 encoding.
ch | The char unit to test. |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
This method is deprecated. Use isWhitespace(char)
Returns whether the character is a Java space.c | the character |
---|
codePoint | the character, including supplementary characters |
---|
A test for determining if the codePoint
is within the
supplementary code point range.
codePoint | The code point to test. |
---|
A test for determining if the char
pair is a valid
surrogate pair.
high | The high surrogate unit to test. |
---|---|
low | The low surrogate unit to test. |
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
A test for determining if the codePoint
is a valid Unicode
code point.
codePoint | The code point to test. |
---|
codePoint | the character, including supplementary characters |
---|
c
is a whitespace character
in Java, otherwise false.
c | the character |
---|
c
is a whitespace character
in Java, otherwise false.
Determines the index into the char[]
that is offset
(measured in code points and specified by codePointOffset
),
from the index
argument and is within the subsequence as
delineated by start
and count
.
seq | The char[] to find the index within. |
---|---|
start | The inclusive index that marks the beginning of the subsequence. |
count | The number of char values to include within
the subsequence. |
index | The index to begin from, within the char[] . |
codePointOffset | The number of code points to look back or forwards; may be a negative or positive value. |
codePointOffset
code
points from index
.NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if start or
count is negative, start + count
greater than seq.length , index is
less than start , index is greater
than start + count or there aren't enough values
in seq after index or before
index if codePointOffset is
negative. |
Determines the index into the CharSequence
that is offset
(measured in code points and specified by codePointOffset
),
from the index
argument.
seq | The CharSequence to find the index within. |
---|---|
index | The index to begin from, within the
CharSequence . |
codePointOffset | The number of code points to look back or forwards; may be a negative or positive value. |
codePointOffset
code
points from index
.NullPointerException | if seq is null . |
---|---|
IndexOutOfBoundsException | if index is negative,
greater than seq.length() , there aren't enough
values in seq after index or before
index if codePointOffset is
negative. |
c | the character |
---|
Converts the Unicode code point, codePoint
, into a UTF-16
encoded sequence that is returned as a char[]
.
codePoint | The Unicode code point to encode. |
---|
char
sequence; if code point is
a supplementary code point,
then a 2 char
array is returned, otherwise a 1
char
array is returned.IllegalArgumentException | if codePoint is not a
valid Unicode code point. |
---|
Converts the Unicode code point, codePoint
, into a UTF-16
encoded sequence and copies the value(s) into the
char[]
dst
, starting at the index
dstIndex
.
codePoint | The Unicode code point to encode. |
---|---|
dst | The char[] to copy the encoded value into. |
dstIndex | The index to start copying into dst . |
char
value units copied into
dst
.IllegalArgumentException | if codePoint is not a
valid Unicode code point. |
---|---|
NullPointerException | if dst is null . |
IndexOutOfBoundsException | if dstIndex is negative,
greater than or equal to dst.length or equals
dst.length - 1 when codePoint is a
supplementary code point. |
Converts a surrogate pair into a Unicode code point. This method assume 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.
high | The high surrogate unit. |
---|---|
low | The low surrogate unit. |
codePoint | the character, including supplementary characters |
---|
c | the character |
---|
value | the character |
---|
codePoint | the character |
---|
c | the character |
---|
c | the character |
---|
codePoint | the character, including supplementary characters |
---|
Returns a Character
instance for the char
value passed. This method is preferred over the constructor, as this
method may maintain a cache of instances.
c | The char value. |
---|
Character
instance.Copyright 2007 Google Inc. | Build 0.9_r1-98467 - 14 Aug 2008 18:48 |