Character class wraps a value of the primitive type char in an object.
More...
#include <java_lang_Character.h>
Inheritance diagram for java::lang::Character:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::Character > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::Character > > | array2D |
Public Member Functions | |
| Character (jchar value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Character object that represents the specified char value. | |
| jchar | charValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Character object. | |
| jint | compareTo (const ::java::lang::Character &anotherCharacter,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares two Character objects numerically. | |
| jint | compareTo (const ::java::lang::Object &o,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares this Character object to another object. | |
| bool | equals (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Compares this object against the specified object. | |
| jint | hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a hash code for this Character. | |
| ::java::lang::String | toString (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a String object representing this Character's value. | |
Static Public Member Functions | |
| static jint | digit (jchar ch, jint radix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the numeric value of the character ch in the specified radix. | |
| static jchar | forDigit (jint digit, jint radix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines the character representation for a specific digit in the specified radix. | |
| static jbyte | getDirectionality (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns the Unicode directionality property for the given character. | |
| static jint | getNumericValue (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the int value that the specified Unicode character represents. | |
| static jint | getType (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns a value indicating a character's general category. | |
| static bool | isDefined (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if a character is defined in Unicode. | |
| static bool | isDigit (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a digit. | |
| static bool | isIdentifierIgnorable (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. | |
| static bool | isISOControl (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is an ISO control character. | |
| static bool | isJavaIdentifierPart (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character may be part of a Java identifier as other than the first character. | |
| static bool | isJavaIdentifierStart (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is permissible as the first character in a Java identifier. | |
| static bool | isJavaLetter (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is permissible as the first character in a Java identifier. | |
| static bool | isJavaLetterOrDigit (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character may be part of a Java identifier as other than the first character. | |
| static bool | isLetter (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a letter. | |
| static bool | isLetterOrDigit (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a letter or digit. | |
| static bool | isLowerCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a lowercase character. | |
| static bool | isMirrored (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines whether the character is mirrored according to the Unicode specification. | |
| static bool | isSpace (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is ISO-LATIN-1 white space. | |
| static bool | isSpaceChar (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a Unicode space character. | |
| static bool | isTitleCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is a titlecase character. | |
| static bool | isUnicodeIdentifierPart (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character may be part of a Unicode identifier as other than the first character. | |
| static bool | isUnicodeIdentifierStart (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is permissible as the first character in a Unicode identifier. | |
| static bool | isUpperCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is an uppercase character. | |
| static bool | isWhitespace (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Determines if the specified character is white space according to Java. | |
| static jchar | toLowerCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Converts the character argument to lowercase using case mapping information from the UnicodeData file. | |
| ::java::lang::String | toString (jchar c,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a String object representing the specified char. | |
| static jchar | toTitleCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Converts the character argument to titlecase using case mapping information from the UnicodeData file. | |
| static jchar | toUpperCase (jchar ch,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Converts the character argument to uppercase using case mapping information from the UnicodeData file. | |
Static Public Attributes | |
| static xmog_byte | COMBINING_SPACING_MARK |
| General category "Mc" in the Unicode specification. | |
| static xmog_byte | CONNECTOR_PUNCTUATION |
| General category "Pc" in the Unicode specification. | |
| static xmog_byte | CONTROL |
| General category "Cc" in the Unicode specification. | |
| static xmog_byte | CURRENCY_SYMBOL |
| General category "Sc" in the Unicode specification. | |
| static xmog_byte | DASH_PUNCTUATION |
| General category "Pd" in the Unicode specification. | |
| static xmog_byte | DECIMAL_DIGIT_NUMBER |
| General category "Nd" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_ARABIC_NUMBER |
| Weak bidirectional character type "AN" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_BOUNDARY_NEUTRAL |
| Weak bidirectional character type "BN" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_COMMON_NUMBER_SEPARATOR |
| Weak bidirectional character type "CS" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_EUROPEAN_NUMBER |
| Weak bidirectional character type "EN" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR |
| Weak bidirectional character type "ES" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR |
| Weak bidirectional character type "ET" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_LEFT_TO_RIGHT |
| Strong bidirectional character type "L" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING |
| Strong bidirectional character type "LRE" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE |
| Strong bidirectional character type "LRO" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_NONSPACING_MARK |
| Weak bidirectional character type "NSM" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_OTHER_NEUTRALS |
| Neutral bidirectional character type "ON" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_PARAGRAPH_SEPARATOR |
| Neutral bidirectional character type "B" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_POP_DIRECTIONAL_FORMAT |
| Weak bidirectional character type "PDF" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_RIGHT_TO_LEFT |
| Strong bidirectional character type "R" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC |
| Strong bidirectional character type "AL" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING |
| Strong bidirectional character type "RLE" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE |
| Strong bidirectional character type "RLO" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_SEGMENT_SEPARATOR |
| Neutral bidirectional character type "S" in the Unicode specification. | |
| static xmog_byte | DIRECTIONALITY_UNDEFINED |
| Undefined bidirectional character type. | |
| static xmog_byte | DIRECTIONALITY_WHITESPACE |
| Neutral bidirectional character type "WS" in the Unicode specification. | |
| static xmog_byte | ENCLOSING_MARK |
| General category "Me" in the Unicode specification. | |
| static xmog_byte | END_PUNCTUATION |
| General category "Pe" in the Unicode specification. | |
| static xmog_byte | FINAL_QUOTE_PUNCTUATION |
| General category "Pf" in the Unicode specification. | |
| static xmog_byte | FORMAT |
| General category "Cf" in the Unicode specification. | |
| static xmog_byte | INITIAL_QUOTE_PUNCTUATION |
| General category "Pi" in the Unicode specification. | |
| static xmog_byte | LETTER_NUMBER |
| General category "Nl" in the Unicode specification. | |
| static xmog_byte | LINE_SEPARATOR |
| General category "Zl" in the Unicode specification. | |
| static xmog_byte | LOWERCASE_LETTER |
| General category "Ll" in the Unicode specification. | |
| static xmog_byte | MATH_SYMBOL |
| General category "Sm" in the Unicode specification. | |
| static xmog_int | MAX_RADIX |
| The maximum radix available for conversion to and from strings. | |
| static xmog_char | MAX_VALUE |
The constant value of this field is the largest value of type char, '\uFFFF'. | |
| static xmog_int | MIN_RADIX |
| The minimum radix available for conversion to and from strings. | |
| static xmog_char | MIN_VALUE |
The constant value of this field is the smallest value of type char, '\u0000'. | |
| static xmog_byte | MODIFIER_LETTER |
| General category "Lm" in the Unicode specification. | |
| static xmog_byte | MODIFIER_SYMBOL |
| General category "Sk" in the Unicode specification. | |
| static xmog_byte | NON_SPACING_MARK |
| General category "Mn" in the Unicode specification. | |
| static xmog_byte | OTHER_LETTER |
| General category "Lo" in the Unicode specification. | |
| static xmog_byte | OTHER_NUMBER |
| General category "No" in the Unicode specification. | |
| static xmog_byte | OTHER_PUNCTUATION |
| General category "Po" in the Unicode specification. | |
| static xmog_byte | OTHER_SYMBOL |
| General category "So" in the Unicode specification. | |
| static xmog_byte | PARAGRAPH_SEPARATOR |
| General category "Zp" in the Unicode specification. | |
| static xmog_byte | PRIVATE_USE |
| General category "Co" in the Unicode specification. | |
| static xmog_byte | SPACE_SEPARATOR |
| General category "Zs" in the Unicode specification. | |
| static xmog_byte | START_PUNCTUATION |
| General category "Ps" in the Unicode specification. | |
| static xmog_byte | SURROGATE |
| General category "Cs" in the Unicode specification. | |
| static xmog_byte | TITLECASE_LETTER |
| General category "Lt" in the Unicode specification. | |
| ::java::lang::Class | TYPE |
The Class instance representing the primitive type char. | |
| static xmog_byte | UNASSIGNED |
| General category "Cn" in the Unicode specification. | |
| static xmog_byte | UPPERCASE_LETTER |
| General category "Lu" in the Unicode specification. | |
Classes | |
| class | Subset |
| Instances of this class represent particular subsets of the Unicode character set. More... | |
| class | UnicodeBlock |
| A family of character subsets representing the character blocks in the Unicode specification. More... | |
Character class wraps a value of the primitive type char in an object.
An object of type Character contains a single field whose type is char.
In addition, this class provides several methods for determining a character's category (lowercase letter, digit, etc.) and for converting characters from uppercase to lowercase and vice versa.
Character information is based on the Unicode Standard, version 3.0.
The methods and data of class Character are defined by the information in the UnicodeData file that is part of the Unicode Character Database maintained by the Unicode Consortium. This file specifies various properties including name and general category for every defined Unicode code point or character range.
The file and its description are available from the Unicode Consortium at:
Guy Steele
Akira Tanaka
|
||||||||||||||||
|
Constructs a newly allocated
|
|
||||||||||||
|
Returns the value of this
|
|
||||||||||||||||
|
Compares two
|
|
||||||||||||||||
|
Compares this
If the object is a
Reimplemented from java::lang::Comparable. |
|
||||||||||||||||||||
|
Returns the numeric value of the character
If the radix is not in the range
|
|
||||||||||||||||
|
Compares this object against the specified object.
The result is
Reimplemented from java::lang::Object. |
|
||||||||||||||||||||
|
Determines the character representation for a specific digit in the specified radix.
If the value of
The
If the digit is less than 10, then
|
|
||||||||||||||||
|
Returns the Unicode directionality property for the given character.
Character directionality is used to calculate the visual ordering of text. The directionality value of undefined
|
|
||||||||||||||||
|
Returns the
For example, the character
The letters A-Z in their uppercase ( If the character does not have a numeric value, then -1 is returned. If the character has a numeric value that cannot be represented as a nonnegative integer (for example, a fractional value), then -2 is returned.
|
|
||||||||||||||||
|
Returns a value indicating a character's general category.
|
|
||||||||||||
|
Returns a hash code for this
Reimplemented from java::lang::Object. |
|
||||||||||||||||
|
Determines if a character is defined in Unicode. A character is defined if at least one of the following is true:
|
|
||||||||||||||||
|
Determines if the specified character is a digit.
A character is a digit if its general category type, provided by Some Unicode character ranges that contain digits:
Many other character ranges contain digits as well.
|
|
||||||||||||||||
|
Determines if the specified character should be regarded as an ignorable character in a Java identifier or a Unicode identifier. The following Unicode characters are ignorable in a Java identifier or a Unicode identifier:
|
|
||||||||||||||||
|
Determines if the specified character is an ISO control character.
A character is considered to be an ISO control character if its code is in the range
|
|
||||||||||||||||
|
Determines if the specified character may be part of a Java identifier as other than the first character. A character may be part of a Java identifier if any of the following are true:
|
|
||||||||||||||||
|
Determines if the specified character is permissible as the first character in a Java identifier. A character may start a Java identifier if and only if one of the following conditions is true:
|
|
||||||||||||||||
|
Determines if the specified character is permissible as the first character in a Java identifier. A character may start a Java identifier if and only if one of the following is true:
|
|
||||||||||||||||
|
Determines if the specified character may be part of a Java identifier as other than the first character. A character may be part of a Java identifier if and only if any of the following are true:
|
|
||||||||||||||||
|
Determines if the specified character is a letter.
A character is considered to be a letter if its general category type, provided by
Not all letters have case. Many characters are letters but are neither uppercase nor lowercase nor titlecase.
|
|
||||||||||||||||
|
Determines if the specified character is a letter or digit.
A character is considered to be a letter or digit if either
|
|
||||||||||||||||
|
Determines if the specified character is a lowercase character.
A character is lowercase if its general category type, provided by The following are examples of lowercase characters: <blockquote>
a b c d e f g h i j k l m n o p q r s t u v w x y z
'\u00DF' '\u00E0' '\u00E1' '\u00E2' '\u00E3' '\u00E4' '\u00E5' '\u00E6'
'\u00E7' '\u00E8' '\u00E9' '\u00EA' '\u00EB' '\u00EC' '\u00ED' '\u00EE'
'\u00EF' '\u00F0' '\u00F1' '\u00F2' '\u00F3' '\u00F4' '\u00F5' '\u00F6'
'\u00F8' '\u00F9' '\u00FA' '\u00FB' '\u00FC' '\u00FD' '\u00FE' '\u00FF'
</blockquote> Many other Unicode characters are lowercase too.
|
|
||||||||||||||||
|
Determines whether the character is mirrored according to the Unicode specification.
Mirrored characters should have their glyphs horizontally mirrored when displayed in text that is right-to-left. For example,
|
|
||||||||||||||||
|
Determines if the specified character is ISO-LATIN-1 white space.
This method returns
|
|
||||||||||||||||
|
Determines if the specified character is a Unicode space character. A character is considered to be a space character if and only if it is specified to be a space character by the Unicode standard. This method returns true if the character's general category type is any of the following:
|
|
||||||||||||||||
|
Determines if the specified character is a titlecase character.
A character is a titlecase character if its general category type, provided by Some characters look like pairs of Latin letters. For example, there is an uppercase letter that looks like "LJ" and has a corresponding lowercase letter that looks like "lj". A third form, which looks like "Lj", is the appropriate form to use when rendering a word in lowercase with initial capitals, as for a book title.
These are some of the Unicode characters for which this method returns
Many other Unicode characters are titlecase too.
|
|
||||||||||||||||
|
Determines if the specified character may be part of a Unicode identifier as other than the first character. A character may be part of a Unicode identifier if and only if one of the following statements is true:
|
|
||||||||||||||||
|
Determines if the specified character is permissible as the first character in a Unicode identifier. A character may start a Unicode identifier if and only if one of the following conditions is true:
|