java.lang
Class Character

java.lang.Object
  extended by java.lang.Character

public final class Character
extends Object

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. In addition, this class provides several methods for determining the type of a character and converting characters from uppercase to lowercase and vice versa. Character information is based on the Unicode Standard, version 3.0. However, in order to reduce footprint, by default the character property and case conversion operations in CLDC are available only for the ISO Latin-1 range of characters. Other Unicode character blocks can be supported as necessary.


Field Summary
static int MAX_RADIX
           
static char MAX_VALUE
           
static int MIN_RADIX
           
static char MIN_VALUE
           
 
Constructor Summary
Character(char value)
          Constructs a Character object and initializes it so that it represents the primitive value argument.
 
Method Summary
 char charValue()
          Returns the value of this Character object.
static int digit(char ch, 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 ch)
          Determines if the specified character is a digit.
static boolean isLowerCase(char ch)
          Determines if the specified character is a lowercase character.
static boolean isUpperCase(char ch)
          Determines if the specified character is an uppercase character.
static char toLowerCase(char ch)
          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 ch)
          Converts the character argument to uppercase; if the character has no uppercase equivalent, the character itself is returned.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_RADIX

public static final int MIN_RADIX
See Also:
Constant Field Values

MAX_RADIX

public static final int MAX_RADIX
See Also:
Constant Field Values

MIN_VALUE

public static final char MIN_VALUE
See Also:
Constant Field Values

MAX_VALUE

public static final char MAX_VALUE
See Also:
Constant Field Values
Constructor Detail

Character

public Character(char value)
Constructs a Character object and initializes it so that it represents the primitive value argument.

Method Detail

digit

public static int digit(char ch,
                        int radix)
Returns the numeric value of the character ch in the specified radix.


equals

public boolean equals(Object obj)
Compares this object against the specified object. The result is true if and only if the argument is not null and is a Character object that represents the same char value as this object.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code for this Character.

Overrides:
hashCode in class Object

isDigit

public static boolean isDigit(char ch)
Determines if the specified character is a digit.


isLowerCase

public static boolean isLowerCase(char ch)
Determines if the specified character is a lowercase character. Note that by default CLDC only supports the ISO Latin-1 range of characters. Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are lowercase: 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 ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ø ù ú û ü ý þ ÿ


isUpperCase

public static boolean isUpperCase(char ch)
Determines if the specified character is an uppercase character. Note that by default CLDC only supports the ISO Latin-1 range of characters. Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are uppercase: 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 À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö Ø Ù Ú Û Ü Ý Þ


toLowerCase

public static char toLowerCase(char ch)
The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned. Note that by default CLDC only supports the ISO Latin-1 range of characters.


toUpperCase

public static char toUpperCase(char ch)
Converts the character argument to uppercase; if the character has no uppercase equivalent, the character itself is returned. Note that by default CLDC only supports the ISO Latin-1 range of characters.


toString

public String toString()
Returns a String object representing this character's value. Converts this 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.

Overrides:
toString in class Object

charValue

public char charValue()
Returns the value of this Character object.