Class java.lang.Character
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.lang.Character

java.lang.Object
   |
   +----java.lang.Character

public final class Character
extends Object
The Character class provides an object wrapper for Character data values and serves as a place for character-oriented operations. A wrapper is useful because most of Java's utility classes require the use of objects. Since characters are not objects in Java, they need to be "wrapped" in a Character instance.

Variable Index

 o MAX_RADIX
The maximum radix available for conversion to and from Strings.
 o MIN_RADIX
The minimum radix available for conversion to and from Strings.

Constructor Index

 o Character(char)
Constructs a Character object with the specified value.

Method Index

 o charValue()
Returns the value of this Character object.
 o digit(char, int)
Returns the numeric value of the character digit using the specified radix.
 o equals(Object)
Compares this object against the specified object.
 o forDigit(int, int)
Returns the character value for the specified digit in the specified radix.
 o hashCode()
Returns a hashcode for this Character.
 o isDigit(char)
Determines if the specified character is a ISO-LATIN-1 digit.
 o isLowerCase(char)
Determines if the specified character is ISO-LATIN-1 lower case.
 o isSpace(char)
Determines if the specified character is ISO-LATIN-1 white space according to Java.
 o isUpperCase(char)
Determines if the specified character is ISO-LATIN-1 upper case.
 o toLowerCase(char)
Returns the lower case character value of the specified ISO-LATIN-1 character.
 o toString()
Returns a String object representing this character's value.
 o toUpperCase(char)
Returns the upper case character value of the specified ISO-LATIN-1 character.

Variables

 o MIN_RADIX
  public final static int MIN_RADIX
The minimum radix available for conversion to and from Strings. The lowest minimum value that a radix can be is 2.
See Also:
toString
 o MAX_RADIX
  public final static int MAX_RADIX
The maximum radix available for conversion to and from Strings. The largest maximum value that a radix can have is 36.
See Also:
toString

Constructors

 o Character
  public Character(char value)
Constructs a Character object with the specified value.
Parameters:
value - value of this Character object

Methods

 o isLowerCase
  public static boolean isLowerCase(char ch)
Determines if the specified character is ISO-LATIN-1 lower case.
Parameters:
ch - the character to be tested
Returns:
true if the character is lower case; false otherwise.
 o isUpperCase
  public static boolean isUpperCase(char ch)
Determines if the specified character is ISO-LATIN-1 upper case.
Parameters:
ch - the character to be tested
Returns:
true if the character is upper case; false otherwise.
 o isDigit
  public static boolean isDigit(char ch)
Determines if the specified character is a ISO-LATIN-1 digit.
Parameters:
ch - the character to be tested
Returns:
true if this character is a digit; false otherwise.
 o isSpace
  public static boolean isSpace(char ch)
Determines if the specified character is ISO-LATIN-1 white space according to Java.
Parameters:
ch - the character to be tested
Returns:
true if the character is white space; false otherwise.
 o toLowerCase
  public static char toLowerCase(char ch)
Returns the lower case character value of the specified ISO-LATIN-1 character. Characters that are not upper case letters are returned unmodified.
Parameters:
ch - the character to be converted
 o toUpperCase
  public static char toUpperCase(char ch)
Returns the upper case character value of the specified ISO-LATIN-1 character. Characters that are not lower case letters are returned unmodified. Note that German ess-zed and latin small letter y diaeresis have no corresponding upper case letters, even though they are lower case. There is a capital y diaeresis, but not in ISO-LATIN-1...
Parameters:
ch - the character to be converted
 o digit
  public static int digit(char ch,
                          int radix)
Returns the numeric value of the character digit using the specified radix. If the character is not a valid digit, it returns -1.
Parameters:
ch - the character to be converted
radix - the radix
 o forDigit
  public static char forDigit(int digit,
                              int radix)
Returns the character value for the specified digit in the specified radix. If the digit is not valid in the radix, the 0 character is returned.
Parameters:
digit - the digit chosen by the character value
radix - the radix containing the digit
 o charValue
  public char charValue()
Returns the value of this Character object.
 o hashCode
  public int hashCode()
Returns a hashcode for this Character.
Overrides:
hashCode in class Object
 o equals
  public boolean equals(Object obj)
Compares this object against the specified object.
Parameters:
obj - the object to compare with
Returns:
true if the objects are the same; false otherwise.
Overrides:
equals in class Object
 o toString
  public String toString()
Returns a String object representing this character's value.
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index