|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Character
public final class Character
The 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
.
Field Summary | |
---|---|
static int |
MAX_RADIX
The maximum radix available for conversion to and from Strings. |
static char |
MAX_VALUE
The constant value of this field is the largest value of type char , '\uFFFF' . |
static int |
MIN_RADIX
The minimum radix available for conversion to and from Strings. |
static char |
MIN_VALUE
The constant value of this field is the smallest value of type char , '\u0000' . |
Constructor Summary | |
---|---|
Character(char c)
Constructs a newly allocated Character object that
represents the specified char value. |
Method Summary | |
---|---|
char |
charValue()
Returns the value of this Character object. |
static int |
digit(char c,
int radix)
Returns the numeric value of the character ch
in the specified radix. |
boolean |
equals(Object obj)
Compares this object against the specified object. |
int |
hashCode()
Returns a hash code for this Character. |
static boolean |
isDigit(char c)
Determines if the specified character is a digit. |
static boolean |
isLowerCase(char c)
Determines if the specified character is a lowercase character. |
static boolean |
isUpperCase(char c)
Determines if the specified character is an uppercase character. |
static char |
toLowerCase(char c)
The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned. |
String |
toString()
Returns a String object representing this character's value. |
static char |
toUpperCase(char c)
Converts the character argument to uppercase; if the character has no lowercase equivalent, the character itself is returned. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MIN_RADIX
Integer.toString(int, int)
,
Integer.valueOf(java.lang.String)
,
Constant Field Valuespublic static final int MAX_RADIX
Integer.toString(int, int)
,
Integer.valueOf(java.lang.String)
,
Constant Field Valuespublic static final char MIN_VALUE
char
, '\u0000'
.
public static final char MAX_VALUE
char
, '\uFFFF'
.
Constructor Detail |
---|
public Character(char c)
Character
object that
represents the specified char
value.
c
- the value to be represented by the
Character
object.Method Detail |
---|
public char charValue()
Character
object.
char
value represented by
this object.public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public boolean equals(Object obj)
true
if and only if the argument is not
null
and is a Character
object that
represents the same char
value as this object.
equals
in class Object
obj
- the object to compare with.
true
if the objects are the same;
false
otherwise.Boolean.hashCode()
,
Hashtable
public String toString()
Character
object to a string. The
result is a string whose length is 1
. The string's
sole component is the primitive char
value represented
by this object.
toString
in class Object
public static boolean isLowerCase(char c)
c
- the character to be tested.
true
if the character is lowercase;
false
otherwise.public static boolean isUpperCase(char c)
c
- the character to be tested.
true
if the character is uppercase;
false
otherwise.isLowerCase(char)
,
toUpperCase(char)
public static char toLowerCase(char c)
c
- the character to be converted.
isLowerCase(char)
,
isUpperCase(char)
,
toUpperCase(char)
public static char toUpperCase(char c)
c
- the character to be converted.
isLowerCase(char)
,
isUpperCase(char)
,
toLowerCase(char)
public static boolean isDigit(char c)
c
- the character to be tested.
true
if the character is a digit;
false
otherwise.public static int digit(char c, int radix)
ch
in the specified radix.
This is only supported for ISO Latin-1 characters.
c
- the character to be converted.radix
- the radix.
isDigit(char)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |