    All Packages    This Package    Previous    Next

# 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.

Version:
  1.13, 31 Jan 1995
Author:
  Lee Boynton

##

MAX_RADIX
  The maximum radix available for conversion to/from strings.
MIN_RADIX
  The minimum radix available for conversion to/from strings.

##

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

##

charValue()
  Returns the value of this Character object.
digit(char, int)
  Returns the numeric value of the character digit using the specified radix.
forDigit(int, int)
  Returns the character value for the specified digit in the specified radix.
isDigit(char)
  Determines if a character is a digit.
isLowerCase(char)
  Determines if a character is lower case.
isUpperCase(char)
  Determines if a character is upper case.
toLowerCase(char)
  Returns the lower case character value of the specified character value.
toString()
  Returns a String object representing this character's value.
toUpperCase(char)
  Returns the upper case character value of the specified character value.

##

MIN_RADIX

      public final static int MIN_RADIX

  The minimum radix available for conversion to/from strings.
  See Also:
    toString

MAX_RADIX

      public final static int MAX_RADIX

  The maximum radix available for conversion to/from strings.
  See Also:
    toString

##

Character

      public Character(char value)

  Constructs a Character object with the specified value.

##

isLowerCase

      public static boolean isLowerCase(char ch)

  Determines if a character is lower case.
  Parameters:
    ch - the character to be tested
  Returns:
    true if the character is lower case.

isDigit

      public static boolean isDigit(char ch)

  Determines if a character is a digit.
  Parameters:
    ch - the character to be tested
  Returns:
    true if the character is a digit.

isUpperCase

      public static boolean isUpperCase(char ch)

  Determines if a character is upper case.
  Parameters:
    ch - the character to be tested
  Returns:
    true if the character is upper case.

toLowerCase

      public static char toLowerCase(char ch)

  Returns the lower case character value of the specified character value. Characters that are not upper case letters are returned unmodified.
  Parameters:
    ch - the character to be converted
  Returns:
    the lower case version of ch

toUpperCase

      public static char toUpperCase(char ch)

  Returns the upper case character value of the specified character value. Characters that are not lower case letters are returned unmodified.
  Parameters:
    ch - the character to be converted
  Returns:
    the upper case version of ch

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, return -1.
  Parameters:
    ch - the character to be converted
    radix - the radix
  Returns:
    the corresponding numeric value

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 that radix, the 0 character is returned.
  Parameters:
    digit - the digit
    radix - the radix
  Returns:
    the corresponding character

charValue

      public char charValue()

  Returns the value of this Character object.

toString

      public String toString()

  Returns a String object representing this character's value.
  Returns:
    a String representing the value of the character.
  Overrides:
    toString in class Object

    All Packages    This Package    Previous    Next