org.jboss.lang
Class CharacterRedirects
java.lang.Object
org.jboss.lang.CharacterRedirects
public final class CharacterRedirects
- extends Object
Contains methods added to java.lang.Character in 1.5.
Strings in 1.4 don't know about surrogate pairs and the difference between
code points and chars, so for now just treat characters as if they were code points.
Method Summary |
static int |
charCount(int codePoint)
|
static int |
codePointAt(char[] a,
int index)
|
static int |
codePointAt(char[] a,
int index,
int limit)
|
static int |
codePointAt(CharSequence seq,
int index)
|
static int |
codePointBefore(char[] a,
int index)
|
static int |
codePointBefore(char[] a,
int index,
int start)
|
static int |
codePointBefore(CharSequence seq,
int index)
|
static int |
codePointCount(char[] a,
int offset,
int count)
|
static int |
codePointCount(CharSequence seq,
int beginIndex,
int endIndex)
|
static int |
digit(int codePoint,
int radix)
|
static byte |
getDirectionality(int codePoint)
|
static int |
getNumericValue(int codePoint)
|
static int |
getType(int codePoint)
|
static boolean |
isDefined(int codePoint)
|
static boolean |
isDigit(int codePoint)
|
static boolean |
isHighSurrogate(char ch)
|
static boolean |
isIdentifierIgnorable(int codePoint)
|
static boolean |
isISOControl(int codePoint)
|
static boolean |
isJavaIdentifierPart(int codePoint)
|
static boolean |
isJavaIdentifierStart(int codePoint)
|
static boolean |
isLetter(int codePoint)
|
static boolean |
isLetterOrDigit(int codePoint)
|
static boolean |
isLowerCase(int codePoint)
|
static boolean |
isLowSurrogate(char ch)
|
static boolean |
isMirrored(int codePoint)
|
static boolean |
isSpaceChar(int codePoint)
|
static boolean |
isSurrogatePair(char high,
char low)
|
static boolean |
isTitleCase(int codePoint)
|
static boolean |
isUnicodeIdentifierPart(int codePoint)
|
static boolean |
isUnicodeIdentifierStart(int codePoint)
|
static boolean |
isUpperCase(int codePoint)
|
static boolean |
isWhitespace(int codePoint)
|
static int |
offsetByCodePoints(char[] a,
int start,
int count,
int index,
int codePointOffset)
|
static int |
offsetByCodePoints(CharSequence seq,
int index,
int codePointOffset)
|
static char |
reverseBytes(char ch)
|
static char[] |
toChars(int codePoint)
|
static int |
toChars(int codePoint,
char[] dst,
int dstIndex)
|
static int |
toCodePoint(char high,
char low)
Get the code point for the given high+low surrogate. |
static int |
toLowerCase(int codePoint)
|
static int |
toTitleCase(int codePoint)
|
static int |
toUpperCase(int codePoint)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharacterRedirects
public CharacterRedirects()
isHighSurrogate
public static boolean isHighSurrogate(char ch)
isLowSurrogate
public static boolean isLowSurrogate(char ch)
isSurrogatePair
public static boolean isSurrogatePair(char high,
char low)
charCount
public static int charCount(int codePoint)
toCodePoint
public static int toCodePoint(char high,
char low)
- Get the code point for the given high+low surrogate. Since
java 1.4 doesn't support surrogates, the result of this method
is always undefined. Just return '?'.
- Parameters:
high
- the high surrogatelow
- the low surrogate
- Returns:
- the code point
codePointAt
public static int codePointAt(CharSequence seq,
int index)
codePointAt
public static int codePointAt(char[] a,
int index)
codePointAt
public static int codePointAt(char[] a,
int index,
int limit)
codePointBefore
public static int codePointBefore(CharSequence seq,
int index)
codePointBefore
public static int codePointBefore(char[] a,
int index)
codePointBefore
public static int codePointBefore(char[] a,
int index,
int start)
toChars
public static int toChars(int codePoint,
char[] dst,
int dstIndex)
toChars
public static char[] toChars(int codePoint)
codePointCount
public static int codePointCount(CharSequence seq,
int beginIndex,
int endIndex)
codePointCount
public static int codePointCount(char[] a,
int offset,
int count)
offsetByCodePoints
public static int offsetByCodePoints(CharSequence seq,
int index,
int codePointOffset)
offsetByCodePoints
public static int offsetByCodePoints(char[] a,
int start,
int count,
int index,
int codePointOffset)
isLowerCase
public static boolean isLowerCase(int codePoint)
isUpperCase
public static boolean isUpperCase(int codePoint)
isTitleCase
public static boolean isTitleCase(int codePoint)
isDigit
public static boolean isDigit(int codePoint)
isDefined
public static boolean isDefined(int codePoint)
isLetter
public static boolean isLetter(int codePoint)
isLetterOrDigit
public static boolean isLetterOrDigit(int codePoint)
isJavaIdentifierStart
public static boolean isJavaIdentifierStart(int codePoint)
isJavaIdentifierPart
public static boolean isJavaIdentifierPart(int codePoint)
isUnicodeIdentifierStart
public static boolean isUnicodeIdentifierStart(int codePoint)
isUnicodeIdentifierPart
public static boolean isUnicodeIdentifierPart(int codePoint)
isIdentifierIgnorable
public static boolean isIdentifierIgnorable(int codePoint)
toLowerCase
public static int toLowerCase(int codePoint)
toUpperCase
public static int toUpperCase(int codePoint)
toTitleCase
public static int toTitleCase(int codePoint)
digit
public static int digit(int codePoint,
int radix)
getNumericValue
public static int getNumericValue(int codePoint)
isSpaceChar
public static boolean isSpaceChar(int codePoint)
isWhitespace
public static boolean isWhitespace(int codePoint)
isISOControl
public static boolean isISOControl(int codePoint)
getType
public static int getType(int codePoint)
getDirectionality
public static byte getDirectionality(int codePoint)
isMirrored
public static boolean isMirrored(int codePoint)
reverseBytes
public static char reverseBytes(char ch)
Copyright © 2005-2007 JBoss, a division of Red Hat, Inc. All Rights Reserved.