net.rim.device.api.util
Class CharacterUtilities

java.lang.Object
  |
  +--net.rim.device.api.util.CharacterUtilities

public final class CharacterUtilities
extends Object

Retreives Unicode attributes for characters.

Since:
JDE 3.6.0

Method Summary
static char getOriginal(char ch)
          Gets the first character in a decomposion, recursively.
static boolean isDigit(char ch)
          Determines if the specified character is a digit.
static boolean isISOControl(char ch)
          Determines if the specified character is a control character.
static boolean isLetter(char ch)
          Determines if the specified character is a letter.
static boolean isLowerCase(char ch)
          Determines if the specified character is a lowercase character.
static boolean isPunctuation(char ch)
          Determines if the specified character is punctuation.
static boolean isSpaceChar(char ch)
          Determines if the specified character is a separator.
static boolean isSymbol(char ch)
          Determines if the specified character is a symbol.
static boolean isUpperCase(char ch)
          Determines if the specified character is a uppercase character.
static char toLowerCase(char ch)
          Converts character to lowercase.
static char toUpperCase(char ch)
          Converts character to uppercase.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail


getOriginal

public static char getOriginal(char ch)
Gets the first character in a decomposion, recursively.

You can use this method for stripping accents off characters. For example, U+00E9 would return U+0065. U+1EDA would return U+004F.

Parameters:
ch - Character to use as source.
Returns:
First character from the supplied composed character.
Since:
JDE 3.6.0

isDigit

public static boolean isDigit(char ch)
Determines if the specified character is a digit.
Parameters:
ch - the character to be tested.
Returns:
True if the character is a digit.
Since:
JDE 4.0.0

isISOControl

public static boolean isISOControl(char ch)
Determines if the specified character is a control character.
Parameters:
ch - the character to be tested.
Returns:
True if the character is a control character.
Since:
JDE 4.0.0

isLetter

public static boolean isLetter(char ch)
Determines if the specified character is a letter.
Parameters:
ch - the character to be tested.
Returns:
True if the character is a letter.
Since:
JDE 4.0.0

isLowerCase

public static boolean isLowerCase(char ch)
Determines if the specified character is a lowercase character.
Parameters:
ch - the character to be tested.
Returns:
True if the character is lowercase.
Since:
JDE 4.0.0

isPunctuation

public static boolean isPunctuation(char ch)
Determines if the specified character is punctuation.
Parameters:
ch - the character to be tested.
Returns:
True if the character is punctuation.
Since:
JDE 4.0.0

isSpaceChar

public static boolean isSpaceChar(char ch)
Determines if the specified character is a separator.
Parameters:
ch - the character to be tested.
Returns:
True if the character is a separator.
Since:
JDE 4.0.0

isSymbol

public static boolean isSymbol(char ch)
Determines if the specified character is a symbol.
Parameters:
ch - the character to be tested.
Returns:
True if the character is a symbol.
Since:
JDE 4.0.0

isUpperCase

public static boolean isUpperCase(char ch)
Determines if the specified character is a uppercase character.
Parameters:
ch - the character to be tested.
Returns:
True if the character is uppercase.
Since:
JDE 4.0.0

toLowerCase

public static char toLowerCase(char ch)
Converts character to lowercase.
Parameters:
ch - the character to be converted.
Returns:
Lowercase.
Since:
JDE 4.0.0

toUpperCase

public static char toUpperCase(char ch)
Converts character to uppercase.
Parameters:
ch - the character to be converted.
Returns:
Uppercase.
Since:
JDE 4.0.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.