|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Character
public class Character
Character provides a class for char values stored in objects.
| Nested Class Summary | |
|---|---|
static class |
Character.Subset
Subset a subset of the unicode characters. |
static class |
Character.UnicodeBlock
UnicodeBlock represents the characters in a unicode block. |
| Field Summary | |
|---|---|
static byte |
COMBINING_SPACING_MARK
Unicode category |
static byte |
CONNECTOR_PUNCTUATION
Unicode category |
static byte |
CONTROL
Unicode category |
static byte |
CURRENCY_SYMBOL
Unicode category |
static byte |
DASH_PUNCTUATION
Unicode category |
static byte |
DECIMAL_DIGIT_NUMBER
Unicode category |
static byte |
DIRECTIONALITY_ARABIC_NUMBER
Unicode directionality |
static byte |
DIRECTIONALITY_BOUNDARY_NEUTRAL
Unicode directionality |
static byte |
DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
Unicode directionality |
static byte |
DIRECTIONALITY_EUROPEAN_NUMBER
Unicode directionality |
static byte |
DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
Unicode directionality |
static byte |
DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
Unicode directionality |
static byte |
DIRECTIONALITY_LEFT_TO_RIGHT
Unicode directionality |
static byte |
DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
Unicode directionality |
static byte |
DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
Unicode directionality |
static byte |
DIRECTIONALITY_NONSPACING_MARK
Unicode directionality |
static byte |
DIRECTIONALITY_OTHER_NEUTRALS
Unicode directionality |
static byte |
DIRECTIONALITY_PARAGRAPH_SEPARATOR
Unicode directionality |
static byte |
DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
Unicode directionality |
static byte |
DIRECTIONALITY_RIGHT_TO_LEFT
Unicode directionality |
static byte |
DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
Unicode directionality |
static byte |
DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
Unicode directionality |
static byte |
DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
Unicode directionality |
static byte |
DIRECTIONALITY_SEGMENT_SEPARATOR
Unicode directionality |
static byte |
DIRECTIONALITY_UNDEFINED
Unicode directionality |
static byte |
DIRECTIONALITY_WHITESPACE
Unicode directionality |
static byte |
ENCLOSING_MARK
Unicode category |
static byte |
END_PUNCTUATION
Unicode category |
static byte |
FINAL_QUOTE_PUNCTUATION
Unicode category |
static byte |
FORMAT
Unicode category |
static byte |
INITIAL_QUOTE_PUNCTUATION
Unicode category |
static byte |
LETTER_NUMBER
Unicode category |
static byte |
LINE_SEPARATOR
Unicode category |
static byte |
LOWERCASE_LETTER
Unicode category |
static byte |
MATH_SYMBOL
Unicode category |
static int |
MAX_CODE_POINT
Max value for code point. |
static char |
MAX_HIGH_SURROGATE
Maximum high surrrogate code in UTF-16 encoding. |
static char |
MAX_LOW_SURROGATE
Maximum low surrrogate code in UTF-16 encoding. |
static int |
MAX_RADIX
Maximum radix fro conversion to/from strings |
static char |
MAX_SURROGATE
Maximum surrrogate code in UTF-16 encoding. |
static char |
MAX_VALUE
Larges char value |
static int |
MIN_CODE_POINT
Min value for code point. |
static char |
MIN_HIGH_SURROGATE
Minimum high surrrogate code in UTF-16 encoding. |
static char |
MIN_LOW_SURROGATE
Minimum low surrrogate code in UTF-16 encoding. |
static int |
MIN_RADIX
Minimum radix fro conversion to/from strings |
static int |
MIN_SUPPLEMENTARY_CODE_POINT
Min value for supplementary code point. |
static char |
MIN_SURROGATE
Minimum surrrogate code in UTF-16 encoding. |
static char |
MIN_VALUE
Smallest char values |
static byte |
MODIFIER_LETTER
Unicode category |
static byte |
MODIFIER_SYMBOL
Unicode category |
static byte |
NON_SPACING_MARK
Unicode category |
static byte |
OTHER_LETTER
Unicode category |
static byte |
OTHER_NUMBER
Unicode category |
static byte |
OTHER_PUNCTUATION
Unicode category |
static byte |
OTHER_SYMBOL
Unicode category |
static byte |
PARAGRAPH_SEPARATOR
Unicode category |
static byte |
PRIVATE_USE
Unicode category |
static int |
SIZE
The size occupied by one char in bits. |
static byte |
SPACE_SEPARATOR
Unicode category |
static byte |
START_PUNCTUATION
Unicode category |
static byte |
SURROGATE
Unicode category |
static byte |
TITLECASE_LETTER
Unicode category |
static Class<Character> |
TYPE
type for char. |
static byte |
UNASSIGNED
Unicode category |
static byte |
UPPERCASE_LETTER
Unicode category |
| Constructor Summary | |
|---|---|
Character(char value)
Constructor to create an instance of Character with the given char value. |
|
| Method Summary | |
|---|---|
static int |
charCount(int codePoint)
Return number of 16-bit characters required to represent given code point. |
char |
charValue()
charValue returns the value of this character. |
static int |
codePointAt(char[] a,
int index)
Return the code point value at given index. |
static int |
codePointAt(char[] a,
int index,
int end)
Return the code point value at given index and before a given end. |
static int |
codePointAt(CharSequence s,
int index)
Return the code point value at given index. |
static int |
codePointBefore(char[] a,
int index)
Return the code point value before given index. |
static int |
codePointBefore(char[] a,
int index,
int start)
Return the code point value before given index but not before start ensures ((isLowSurrogate(a[index-1]) && (index-2 >= start) && isHighSurrogate(a[index-2])) ==> result == toCodePoint(a[index-2],a[index-1]), (! |
static int |
codePointBefore(CharSequence s,
int index)
Return the code point value before given index. |
static int |
codePointCount(char[] a,
int start,
int len)
Count number of code points in char array from start..start+len. |
static int |
codePointCount(CharSequence s,
int start,
int end)
Count number of code points in char sequence from start..end. |
int |
compareTo(Character anotherCharacter)
compareTo compares this to another instance of character. |
static int |
digit(char ch,
int radix)
digit return the numeric value of the specified character for the given radix. |
static int |
digit(int codePoint,
int radix)
digit return the numeric value of the specified code point for the given radix. |
boolean |
equals(Object obj)
equals checks if this and obj represent the same value. |
static char |
forDigit(int digit,
int radix)
forDigit returns the character representation of a given digit. |
static byte |
getDirectionality(char ch)
getDirectionality returns the directionality of the given character. |
static byte |
getDirectionality(int codePoint)
getDirectionality returns the directionality of the given code point. |
static int |
getNumericValue(char ch)
getNumericValue determines the numeric value of the given character, e.g., "1000" for the roman number "M". |
static int |
getNumericValue(int codePoint)
getNumericValue determines the numeric value of the given character, e.g., "1000" for the roman number "M". |
static int |
getType(char ch)
getType determines the category of a character |
static int |
getType(int codePoint)
getType determines the category of a code point. |
int |
hashCode()
hashCode returns a hash code for this character. |
static boolean |
isDefined(char ch)
isDefined checks if a given character is defined |
static boolean |
isDefined(int codePoint)
isDefined checks if a given code point is defined. |
static boolean |
isDigit(char ch)
isDigit checks if a given character is DECIMAL_DIGIT_NUMBER. |
static boolean |
isDigit(int codePoint)
isDigit checks if a given code point is DECIMAL_DIGIT_NUMBER. |
static boolean |
isHighSurrogate(char ch)
isHighSurrogate determines whether the specified character is in the range '?' .. '?', i.e. the character is a high-surrogate code unit. |
static boolean |
isIdentifierIgnorable(char ch)
isIdentifierIgnorable checks if a character can be ignored within an unicode identifer. |
static boolean |
isIdentifierIgnorable(int codePoint)
isIdentifierIgnorable checks if a code point can be ignored within an unicode identifer. |
static boolean |
isISOControl(char ch)
isISOControl checks if a character is an ISO control character. |
static boolean |
isISOControl(int codePoint)
isISOControl checks if a code point is an ISO control character. |
static boolean |
isJavaIdentifierPart(char ch)
isJavaIdentifierPart checks if a character may be part of a Java identifier other than the first character. |
static boolean |
isJavaIdentifierPart(int codePoint)
isJavaIdentifierPart checks if a code point may be part of a Java identifier other than the first character. |
static boolean |
isJavaIdentifierStart(char ch)
isJavaIdentifierStart checks if a character may be the first character in a Java identifier. |
static boolean |
isJavaIdentifierStart(int codePoint)
isJavaIdentifierStart checks if a code point may be the first character in a Java identifier. |
static boolean |
isJavaLetter(char ch)
Deprecated. replaced by isJavaIdentifierStart(ch) |
static boolean |
isJavaLetterOrDigit(char ch)
Deprecated. replaced by isJavaIdentifierPart(ch) |
static boolean |
isLetter(char ch)
isLetter checks if a character is a letter (UPPERCASE_LETTER, LOWERCASE_LETTER, TITLECASE_LETTER, MODIFIER_LETTER or OTHER_LETTER) |
static boolean |
isLetter(int codePoint)
isLetter checks if a code point is a letter (UPPERCASE_LETTER, LOWERCASE_LETTER, TITLECASE_LETTER, MODIFIER_LETTER or OTHER_LETTER) |
static boolean |
isLetterOrDigit(char ch)
isLetterOrDigit checks if a character is a letter or a digit. |
static boolean |
isLetterOrDigit(int codePoint)
isLetterOrDigit checks if a code point is a letter or a digit. |
static boolean |
isLowerCase(char ch)
isLowerCase checks if a character is lower case |
static boolean |
isLowerCase(int codePoint)
isLowerCase checks if a code point is lower case |
static boolean |
isLowSurrogate(char ch)
isLowSurrogate determines whether the specified character is in the range '?' .. '?', i.e. the character is a low-surrogate code unit. |
static boolean |
isMirrored(char ch)
isMirrored checks if the given character is mirrored, i.e., will be displayed mirrored vertically when displayed right-to-left. |
static boolean |
isMirrored(int codePoint)
isMirrored checks if the given code point is mirrored, i.e., will be displayed mirrored vertically when displayed right-to-left. |
static boolean |
isSpace(char ch)
Deprecated. replaced by isWhitespace(ch) |
static boolean |
isSpaceChar(char ch)
isSpaceChar checks if a character is a space |
static boolean |
isSpaceChar(int codePoint)
isSpaceChar checks if a code point is a space |
static boolean |
isSupplementaryCodePoint(int codePoint)
isSupplementaryCodePoint determines whether the specified code point is in the range 0x10000 .. 0x10FFFF, i.e. the character is within the Unicode supplementary character range. |
static boolean |
isSurrogatePair(char highChar,
char lowChar)
isSurrogatePair determines whether the specified characters from a valid surrogate pair. |
static boolean |
isTitleCase(char ch)
isTitleCase checks if a given character is TITLECASE_LETTER |
static boolean |
isTitleCase(int codePoint)
isTitleCase checks if a given code point is TITLECASE_LETTER |
static boolean |
isUnicodeIdentifierPart(char ch)
isUnicodeIdentifierPart checks if a character may be part of a Unicode identifier other than the first character. |
static boolean |
isUnicodeIdentifierPart(int codePoint)
isUnicodeIdentifierPart checks if a codePointaracter may be part of a Unicode identifier other than the first codePointaracter. |
static boolean |
isUnicodeIdentifierStart(char ch)
isUnicodeIdentifierStart checks if a character may be the first character in a Unicode identifier. |
static boolean |
isUnicodeIdentifierStart(int codePoint)
isUnicodeIdentifierStart checks if a code pointr may be the first character in a Unicode identifier. |
static boolean |
isUpperCase(char ch)
isUpperCase checks if a character is upper case |
static boolean |
isUpperCase(int codePoint)
isUpperCase checks if a code point is lower case |
static boolean |
isValidCodePoint(int codePoint)
isValidCodePoint determines whether the specified code point is in the range 0x0000 .. 0x10FFFF, i.e. it is a valid Unicode code point. |
static boolean |
isWhitespace(char ch)
isWhitespace checks if a character is white space |
static boolean |
isWhitespace(int codePoint)
isWhitespace checks if a code point is white space |
static int |
offsetByCodePoints(char[] a,
int start,
int len,
int index,
int codePointOffset)
Determine the character offset of a code point with given code point offset starting from a given character index in a sub array of a char array. |
static int |
offsetByCodePoints(CharSequence s,
int start,
int codePointOffset)
Determine the character offset of a code point with given code point offset starting from a given character index in a char sequence. |
static char |
reverseBytes(char ch)
reverseBytes swaps the bytes in a given character. |
static char[] |
toChars(int codePoint)
Convert code point to char array. |
static int |
toChars(int codePoint,
char[] dst,
int dstIndex)
Convert code point to UTF-16 representation |
static int |
toCodePoint(char high,
char low)
Convert surrogate pair to code point. |
static char |
toLowerCase(char ch)
toLowerCase converts a character to lower chase |
static int |
toLowerCase(int codePoint)
toLowerCase converts a code point to lower chase |
String |
toString()
Returns value as String. |
static String |
toString(char ch)
Converts a char into a String. |
static char |
toTitleCase(char ch)
toTitleCase converst the given character to title case. |
static int |
toTitleCase(int codePoint)
toTitleCase converst the given code point to title case. |
static char |
toUpperCase(char ch)
toUpperCase converts a character to upper case |
static int |
toUpperCase(int codePoint)
toUpperCase converts a code point to upper chase |
static Character |
valueOf(char ch)
valueOf returns a character instance with the given value. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MIN_RADIX
public static final int MAX_RADIX
public static final char MIN_VALUE
public static final char MAX_VALUE
public static final Class<Character> TYPE
public static final byte UNASSIGNED
public static final byte UPPERCASE_LETTER
public static final byte LOWERCASE_LETTER
public static final byte TITLECASE_LETTER
public static final byte MODIFIER_LETTER
public static final byte OTHER_LETTER
public static final byte NON_SPACING_MARK
public static final byte ENCLOSING_MARK
public static final byte COMBINING_SPACING_MARK
public static final byte DECIMAL_DIGIT_NUMBER
public static final byte LETTER_NUMBER
public static final byte OTHER_NUMBER
public static final byte SPACE_SEPARATOR
public static final byte LINE_SEPARATOR
public static final byte PARAGRAPH_SEPARATOR
public static final byte CONTROL
public static final byte FORMAT
public static final byte PRIVATE_USE
public static final byte SURROGATE
public static final byte DASH_PUNCTUATION
public static final byte START_PUNCTUATION
public static final byte END_PUNCTUATION
public static final byte CONNECTOR_PUNCTUATION
public static final byte OTHER_PUNCTUATION
public static final byte MATH_SYMBOL
public static final byte CURRENCY_SYMBOL
public static final byte MODIFIER_SYMBOL
public static final byte OTHER_SYMBOL
public static final byte INITIAL_QUOTE_PUNCTUATION
public static final byte FINAL_QUOTE_PUNCTUATION
public static final byte DIRECTIONALITY_UNDEFINED
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR
public static final byte DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR
public static final byte DIRECTIONALITY_ARABIC_NUMBER
public static final byte DIRECTIONALITY_COMMON_NUMBER_SEPARATOR
public static final byte DIRECTIONALITY_NONSPACING_MARK
public static final byte DIRECTIONALITY_BOUNDARY_NEUTRAL
public static final byte DIRECTIONALITY_PARAGRAPH_SEPARATOR
public static final byte DIRECTIONALITY_SEGMENT_SEPARATOR
public static final byte DIRECTIONALITY_WHITESPACE
public static final byte DIRECTIONALITY_OTHER_NEUTRALS
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING
public static final byte DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING
public static final byte DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE
public static final byte DIRECTIONALITY_POP_DIRECTIONAL_FORMAT
public static final char MIN_HIGH_SURROGATE
public static final char MAX_HIGH_SURROGATE
public static final char MIN_LOW_SURROGATE
public static final char MAX_LOW_SURROGATE
public static final char MIN_SURROGATE
public static final char MAX_SURROGATE
public static final int MIN_SUPPLEMENTARY_CODE_POINT
public static final int MIN_CODE_POINT
public static final int MAX_CODE_POINT
public static final int SIZE
| Constructor Detail |
|---|
public Character(char value)
value - the value for this instance.| Method Detail |
|---|
public char charValue()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectobj - another object
public String toString()
toString in class Objectpublic static String toString(char ch)
ch - which should be converted to a String
public static byte getDirectionality(char ch)
ch - the character
public static boolean isMirrored(char ch)
ch - the character.
public static boolean isLowerCase(char ch)
ch - the character
public static boolean isUpperCase(char ch)
ch - the character
public static boolean isTitleCase(char ch)
ch - the character
public static boolean isDigit(char ch)
ch - the character
public static boolean isDefined(char ch)
ch - the character
public static boolean isLetter(char ch)
ch - the character
public static boolean isLetterOrDigit(char ch)
ch - the character
@Deprecated public static boolean isJavaLetter(char ch)
ch - the character
@Deprecated public static boolean isJavaLetterOrDigit(char ch)
ch - the character
public static boolean isJavaIdentifierStart(char ch)
ch - the character
isLetter(ch) || getType(ch)==LETTER_NUMBER || (getType(ch) == CURRENCY_SYMBOL) || isConnectingPunctuation(ch)
public static boolean isJavaIdentifierPart(char ch)
ch - the character
isLetter(ch) || (getType(ch) == CURRENCY_SYMBOL) || isConnectingPunctuation(ch) || isDigit(ch) || isNumericLetter(ch) || isCombiningMark(ch) || isNonSpacingMark(ch) || isIdentifierIgnorable(ch);
public static boolean isUnicodeIdentifierStart(char ch)
ch - the characgter
public static boolean isUnicodeIdentifierPart(char ch)
ch - the character.
isConnectingPunctuation(ch) || isDigit(ch) || isNumericLetter(ch) || isCombiningMark(ch) || isNonSpacingMark(ch) || isIdentifierIgnorable(ch)
public static boolean isIdentifierIgnorable(char ch)
ch - the character
public static char toLowerCase(char ch)
ch - the character
public static char toUpperCase(char ch)
ch - the character
public static char toTitleCase(char ch)
ch - the character
public static int digit(char ch,
int radix)
ch - the characterradix - the radix
public static int getNumericValue(char ch)
ch - the character
@Deprecated public static boolean isSpace(char ch)
ch - the character
public static boolean isSpaceChar(char ch)
ch - the character
public static boolean isWhitespace(char ch)
ch - the character
isSpaceChar(ch) && (ch != ' ') && (ch != '?') && (ch != '?') || ((int) ch == 0x0009) || ((int) ch == 0x000A) || ((int) ch == 0x000B) || ((int) ch == 0x000C) || ((int) ch == 0x000D) || ((int) ch == 0x001C) || ((int) ch == 0x001D) || ((int) ch == 0x001E) || ((int) ch == 0x001F)
public static boolean isISOControl(char ch)
ch - the character
((ch >= ' ') && (ch <= '')) || ((ch >= '') && (ch <= 'Ÿ'));
public static int getType(char ch)
ch - the character
public static char forDigit(int digit,
int radix)
digit - the digit.radix - the radix
public int compareTo(Character anotherCharacter)
compareTo in interface Comparable<Character>anotherCharacter - the other character.
NullPointerException - if anotherCharacter is nullpublic static Character valueOf(char ch)
ch - the character value
public static boolean isValidCodePoint(int codePoint)
codePoint - a Unicode code point.
public static boolean isSupplementaryCodePoint(int codePoint)
codePoint - a Unicode code point.
public static boolean isHighSurrogate(char ch)
ch - character to be tested
public static boolean isLowSurrogate(char ch)
ch - character to be tested
public static boolean isSurrogatePair(char highChar,
char lowChar)
highChar - the high surrogate charlowChar - the lowsurrogate char
public static int charCount(int codePoint)
codePoint - a code point, argument is not checked for
validity.
public static int toCodePoint(char high,
char low)
high - high part, should be high surrogate, but not checkedlow - low part, should be low surrogate, but not checked.
public static int codePointAt(CharSequence s,
int index)
ensures
((isHighSurrogate(s.charAt(index))
&& (index+1 < s.length())
&& isLowSurrogate(s.charAt(index+1))) ==> result == toCodePoint(s.charAt(index),s.charAt(index+1)),
(!isHighSurrogate(s.charAt(index))
|| (index+1 >= s.length())
|| !isLowSurrogate(s.charAt(index+1))) ==> result == (int) s.charAt(index)
);
s - a character sequenceindex - the index
NullPointerException - if s is null
IndexOutOfBoundsException - if index<0 || index >=
s.length()
public static int codePointAt(char[] a,
int index)
ensures
((isHighSurrogate(a[index])
&& (index+1 < a.length)
&& isLowSurrogate(a[index+1])) ==> result == toCodePoint(a[index],a[index+1]),
(!isHighSurrogate(a[index])
|| (index+1 >= a.length)
|| !isLowSurrogate(a[index+1])) ==> result == (int) a[index]
);
a - a character arrayindex - the index
NullPointerException - if a is null
IndexOutOfBoundsException - if index<0 || index >= a.length
public static int codePointAt(char[] a,
int index,
int end)
ensures
((isHighSurrogate(a[index])
&& (index+1 < end)
&& isLowSurrogate(a[index+1])) ==> result == toCodePoint(a[index],a[index+1]),
(!isHighSurrogate(a[index])
|| (index+1 >= end)
|| !isLowSurrogate(a[index+1])) ==> result == (int) a[index]
);
a - a character arrayindex - the indexend - the end
NullPointerException - if a is null
IndexOutOfBoundsException - if index < 0 || index >= end
|| end < 0 || end > a.length.
public static int codePointBefore(CharSequence s,
int index)
ensures
((isLowSurrogate(s.charAt(index-1))
&& (index-2 >= 0)
&& isHighSurrogate(s.charAt(index-2))) ==> result == toCodePoint(s.charAt(index-2),s.charAt(index-1)),
(!isLowSurrogate(s.charAt(index-1))
|| (index-2 < 0)
|| !isHighSurrogate(s.charAt(index-2))) ==> result == (int) s.charAt(index-1)
);
s - a character sequenceindex - the index
NullPointerException - if s is null
IndexOutOfBoundsException - if index<=0 || index >
s.length()
public static int codePointBefore(char[] a,
int index)
ensures
((isLowSurrogate(a[index-1])
&& (index-2 >= 0)
&& isHighSurrogate(a[index-2])) ==> result == toCodePoint(a[index-2],a[index-1]),
(!isLowSurrogate(a[index-1])
|| (index-2 < 0)
|| !isHighSurrogate(a[index-2])) ==> result == (int) a[index-1]
);
a - character sequenceindex - the index
NullPointerException - if s is null
IndexOutOfBoundsException - if index<=0 || index >
a.length
public static int codePointBefore(char[] a,
int index,
int start)
ensures
((isLowSurrogate(a[index-1])
&& (index-2 >= start)
&& isHighSurrogate(a[index-2])) ==> result == toCodePoint(a[index-2],a[index-1]),
(!isLowSurrogate(a[index-1])
|| (index-2 < start)
|| !isHighSurrogate(a[index-2])) ==> result == (int) a[index-1]
);
a - character sequenceindex - the indexstart - the start index
NullPointerException - if s is null
IndexOutOfBoundsException - if index<=start || index >
a.length || start < 0 || start >= a.length
public static int toChars(int codePoint,
char[] dst,
int dstIndex)
codePoint - the code pointdst - the target char arraydstIndex - the start index for the target
IllegalArgumentException - if !isValidCodePoint(codePoint)
NullPointerException - if dst is null
IndexOutOfBoundsException - if dstIndex<0 ||
dstIndex>=dst.length || (isSupplementaryCodePoint(codePoint) &&
dstIndex+1>=dst.length.public static char[] toChars(int codePoint)
codePoint - the code point
IllegalArgumentException - if !isValidCodePoint(codePoint);
public static int codePointCount(CharSequence s,
int start,
int end)
s - a char sequencestart - the start indexend - the end index
NullPointerException - if s is null
IndexOutOfBoundsException - if start<0 || end>s.length() ||
start > end.
public static int codePointCount(char[] a,
int start,
int len)
a - a char arraystart - the start indexlen - the length of the sub-array
NullPointerException - if a is null
IndexOutOfBoundsException - if start<0 || len<0 ||
(start+len)>a.length
public static int offsetByCodePoints(CharSequence s,
int start,
int codePointOffset)
s - the char sequencestart - the start index in scodePointOffset - the index of the code point that we are
looking for.
NullPointerException - if s is null
IndexOutOfBoundsException - if codePointOffset<0 || start<0
|| start >= s.length || there are not enough code points in the
sequence starting at start.
public static int offsetByCodePoints(char[] a,
int start,
int len,
int index,
int codePointOffset)
a - the char arraystart - the start of the sub arraylen - the length to the sub arrayindex - the index in acodePointOffset - the index of the code point that we are
looking for.
NullPointerException - if a is null
IndexOutOfBoundsException - if start<0 || len<0 ||
end>a.length || indexpublic static boolean isLowerCase(int codePoint)
codePoint - the code point
public static boolean isUpperCase(int codePoint)
codePoint - the code point
public static boolean isTitleCase(int codePoint)
codePoint - the code point
public static boolean isDigit(int codePoint)
codePoint - the code point
public static boolean isDefined(int codePoint)
codePoint - the code point
public static boolean isLetter(int codePoint)
codePoint - the code point
public static boolean isLetterOrDigit(int codePoint)
codePoint - the code point
public static boolean isJavaIdentifierStart(int codePoint)
codePoint - the code point
isLetter(ch) || getType(ch)==LETTER_NUMBER || (getType(ch) == CURRENCY_SYMBOL) || isConnectingPunctuation(ch)
public static boolean isJavaIdentifierPart(int codePoint)
codePoint - the code point
isLetter(ch) || (getType(ch) == CURRENCY_SYMBOL) || isConnectingPunctuation(ch) || isDigit(ch) || isNumericLetter(ch) || isCombiningMark(ch) || isNonSpacingMark(ch) || isIdentifierIgnorable(ch);
public static boolean isUnicodeIdentifierStart(int codePoint)
codePoint - the code point
public static boolean isUnicodeIdentifierPart(int codePoint)
codePoint - the code point
isConnectingPunctuation(codePoint) || isDigit(codePoint) || isNumericLetter(codePoint) || isCombiningMark(codePoint) || isNonSpacingMark(codePoint) || isIdentifierIgnorable(codePoint)
public static boolean isIdentifierIgnorable(int codePoint)
codePoint - the code point
public static int toLowerCase(int codePoint)
codePoint - the code point
public static int toUpperCase(int codePoint)
codePoint - the code point
public static int toTitleCase(int codePoint)
codePoint - the code point
public static int digit(int codePoint,
int radix)
codePoint - the code pointradix - the radix
public static int getNumericValue(int codePoint)
codePoint - the code point
public static boolean isSpaceChar(int codePoint)
codePoint - the code point
public static boolean isWhitespace(int codePoint)
codePoint - the code point
isSpaceChar(ch) && (ch != ' ') && (ch != '?') && (ch != '?') || ((int) ch == 0x0009) || ((int) ch == 0x000A) || ((int) ch == 0x000B) || ((int) ch == 0x000C) || ((int) ch == 0x000D) || ((int) ch == 0x001C) || ((int) ch == 0x001D) || ((int) ch == 0x001E) || ((int) ch == 0x001F)
public static boolean isISOControl(int codePoint)
codePoint - the code point
((ch >= ' ') && (ch <= '')) || ((ch >= '') && (ch <= 'Ÿ'));
public static int getType(int codePoint)
codePoint - the code point
public static byte getDirectionality(int codePoint)
codePoint - the code point
public static boolean isMirrored(int codePoint)
codePoint - the code point
public static char reverseBytes(char ch)
ch - a character
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||