public final class Character extends Object
Modifier and Type | Field and Description |
---|---|
static byte |
COMBINING_SPACING_MARK
COMBINING_SPACING_MARK
|
static byte |
CONNECTOR_PUNCTUATION
CONNECTOR_PUNCTUATION
|
static byte |
CONTROL
CONTROL
|
static byte |
CURRENCY_SYMBOL
CURRENCY_SYMBOL
|
static byte |
DASH_PUNCTUATION
DASH_PUNCTUATION
|
static byte |
DECIMAL_DIGIT_NUMBER
DECIMAL_DIGIT_NUMBER
|
static byte |
ENCLOSING_MARK
ENCLOSING_MARK
|
static byte |
END_PUNCTUATION
END_PUNCTUATION
|
static byte |
FORMAT
FORMAT
|
static byte |
LETTER_NUMBER
LETTER_NUMBER
|
static byte |
LINE_SEPARATOR
LINE_SEPARATOR
|
static byte |
LOWERCASE_LETTER
LOWERCASE_LETTER
|
static byte |
MATH_SYMBOL
MATH_SYMBOL
|
static int |
MAX_RADIX
MAX_RADIX
|
static char |
MAX_VALUE
MAX_VALUE
|
static int |
MIN_RADIX
MIN_RADIX
|
static char |
MIN_VALUE
MIN_VALUE
|
static byte |
MODIFIER_LETTER
MODIFIER_LETTER
|
static byte |
MODIFIER_SYMBOL
MODIFIER_SYMBOL
|
static byte |
NON_SPACING_MARK
NON_SPACING_MARK
|
static byte |
OTHER_LETTER
OTHER_LETTER
|
static byte |
OTHER_NUMBER
OTHER_NUMBER
|
static byte |
OTHER_PUNCTUATION
OTHER_PUNCTUATION
|
static byte |
OTHER_SYMBOL
OTHER_SYMBOL
|
static byte |
PARAGRAPH_SEPARATOR
PARAGRAPH_SEPARATOR
|
static byte |
PRIVATE_USE
PRIVATE_USE
|
static byte |
SPACE_SEPARATOR
SPACE_SEPARATOR
|
static byte |
START_PUNCTUATION
START_PUNCTUATION
|
static byte |
SURROGATE
SURROGATE
|
static byte |
TITLECASE_LETTER
TITLECASE_LETTER
|
static Class |
TYPE
TYPE
|
static byte |
UNASSIGNED
UNASSIGNED
|
static byte |
UPPERCASE_LETTER
UPPERCASE_LETTER
|
Constructor and Description |
---|
Character(char c)
Character
|
Modifier and Type | Method and Description |
---|---|
char |
charValue()
charValue
|
static int |
digit(char c,
int i)
digit
|
boolean |
equals(Object obj)
Compares two Objects for equality.
|
static char |
forDigit(int i,
int j) |
static int |
getNumericValue(char c) |
static int |
getType(char c) |
int |
hashCode()
Returns a hash code value for the object.
|
static boolean |
isDefined(char c) |
static boolean |
isDigit(char c) |
static boolean |
isIdentifierIgnorable(char c) |
static boolean |
isISOControl(char c) |
static boolean |
isJavaIdentifierPart(char c) |
static boolean |
isJavaIdentifierStart(char c) |
static boolean |
isJavaLetter(char c) |
static boolean |
isJavaLetterOrDigit(char c) |
static boolean |
isLetter(char c) |
static boolean |
isLetterOrDigit(char c) |
static boolean |
isLowerCase(char c) |
static boolean |
isSpace(char c) |
static boolean |
isSpaceChar(char c) |
static boolean |
isTitleCase(char c) |
static boolean |
isUnicodeIdentifierPart(char c) |
static boolean |
isUnicodeIdentifierStart(char c) |
static boolean |
isUpperCase(char c) |
static boolean |
isWhitespace(char c) |
static char |
toLowerCase(char c) |
String |
toString()
Returns a string representation of the object.
|
static char |
toTitleCase(char c) |
static char |
toUpperCase(char c) |
static Character |
valueOf(char c)
Returns a Character instance representing the specified
char value.
|
public static final char MIN_VALUE
public static final char MAX_VALUE
public static final Class TYPE
public static final int MIN_RADIX
public static final int MAX_RADIX
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 char charValue()
public static int digit(char c, int i)
c
- ?i
- ?public boolean equals(Object obj)
Object
The equals
method implements an equivalence relation:
x
,
x.equals(x)
should return true
.
x
and
y
, x.equals(y)
should return
true
if and only if y.equals(x)
returns
true
.
x
,
y
, and z
, if x.equals(y)
returns true
and y.equals(z)
returns
true
, then x.equals(z)
should return
true
.
x
and y
, multiple invocations of x.equals(y)
consistently return true
or consistently return
false
.
x
, x.equals(null)
should return false
.
The equals method for class Object
implements the most
discriminating possible equivalence relation on objects; that is,
for any reference values x
and y
, this
method returns true
if and only if x
and
y
refer to the same object (x==y
has the
value true
).
equals
in class Object
obj
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Boolean.hashCode()
,
Hashtable
public static char forDigit(int i, int j)
i
- ?j
- ?public static int getNumericValue(char c)
c
- ?public static int getType(char c)
c
- ?public int hashCode()
Object
java.util.Hashtable
.
The general contract of hashCode
is:
hashCode
method
must consistently return the same integer. This integer need not
remain consistent from one execution of an application to another
execution of the same application.
equals
method, then calling the hashCode
method on each of the
two objects must produce the same integer result.
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public static boolean isDefined(char c)
c
- ?public static boolean isDigit(char c)
c
- ?public static boolean isISOControl(char c)
c
- ?public static boolean isIdentifierIgnorable(char c)
c
- ?public static boolean isJavaIdentifierPart(char c)
c
- ?public static boolean isJavaIdentifierStart(char c)
c
- ?public static boolean isJavaLetter(char c)
c
- ?public static boolean isJavaLetterOrDigit(char c)
c
- ?public static boolean isLetter(char c)
c
- ?public static boolean isLetterOrDigit(char c)
c
- ?public static boolean isLowerCase(char c)
c
- ?public static boolean isSpace(char c)
c
- ?public static boolean isSpaceChar(char c)
c
- ?public static boolean isTitleCase(char c)
c
- ?public static boolean isUnicodeIdentifierPart(char c)
c
- ?public static boolean isUnicodeIdentifierStart(char c)
c
- ?public static boolean isUpperCase(char c)
c
- ?public static boolean isWhitespace(char c)
c
- ?public static char toLowerCase(char c)
c
- ?public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object.
public static char toTitleCase(char c)
c
- ?public static char toUpperCase(char c)
c
- ?public static Character valueOf(char c)
c
- a char value.