|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.core.UnicodeChar
public class UnicodeChar
This class represents a 32-bit Unicode character. Java 1.4 defines 16-bit characters only. Thus we are forced to roll our own version. As soon as Java supports 32-bit Unicode characters this class is obsolete and might be eliminated.
| Field Summary | |
|---|---|
static UnicodeChar |
BREAK_PERMITTED_HERE
The field BREAK_PERMITTED_HERE contains the optional break. |
static int |
MAX_VALUE
The constant MAX_VALUE contains the maximal admissible code point. |
static int |
MIN_VALUE
The constant MIN_VALUE contains the minimal admissible code point. |
static UnicodeChar |
NEXT_LINE
The field NEXT_LINE contains the next line control character. |
static UnicodeChar |
NO_BREAK_HERE
The field NO_BREAK_HERE contains the break inhibitor. |
static UnicodeChar |
NO_BREAK_SPACE
The field NO_BREAK_SPACE contains the non-breakable space. |
protected static long |
serialVersionUID
The constant serialVersionUID contains the id for serialization. |
static UnicodeChar |
SHY
The constant SHY contains the soft hyphenation character. |
static UnicodeChar |
SPACE
The field SPACE contains the space control character. |
| Constructor Summary | |
|---|---|
protected |
UnicodeChar(int codePoint)
Creates a new object from an integer code point. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object unicodeChar)
Compares a UnicodeChar character with the value of this
object. |
static UnicodeChar |
get(int code)
Creates a new object from a integer code point. |
static UnicodeChar |
get(java.lang.String unicodeName)
Creates a new object from a Unicode name. |
int |
getCodePoint()
Return the Unicode code point. |
int |
getDirection()
Returns the bi-direction property of the character. |
java.lang.String |
getUnicodeName()
Returns the Unicode name of the code. |
int |
hashCode()
Computes the hash code for the character. |
boolean |
isDigit()
Test, if the code is a digit. |
boolean |
isLetter()
Test, if the character is a letter. |
boolean |
isPrintable()
Test, if the code is printable. |
UnicodeChar |
lower()
Returns the lowercase character of this object. |
java.lang.String |
toString()
Returns a String of this object. |
UnicodeChar |
upper()
Returns the uppercase character of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_VALUE
public static final int MIN_VALUE
protected static final long serialVersionUID
public static final UnicodeChar BREAK_PERMITTED_HERE
public static final UnicodeChar NEXT_LINE
public static final UnicodeChar NO_BREAK_HERE
public static final UnicodeChar NO_BREAK_SPACE
public static final UnicodeChar SHY
public static final UnicodeChar SPACE
| Constructor Detail |
|---|
protected UnicodeChar(int codePoint)
throws java.lang.IllegalArgumentException
codePoint - the 32-bit code point
java.lang.IllegalArgumentException - in case that the code point is not in
the acceptable rage from MIN_VALUE to MAX_VALUE| Method Detail |
|---|
public static UnicodeChar get(int code)
code - the code point
public static UnicodeChar get(java.lang.String unicodeName)
unicodeName - the long name of the character
public boolean equals(java.lang.Object unicodeChar)
UnicodeChar character with the value of this
object. They are considered equal if the are both UnicodeChars and have
the same code.
The general signature for comparison to an arbitrary object is required
for the implementation of HashMap and friends.
equals in class java.lang.ObjectunicodeChar - the character to compare
true if the characters are equal, otherwise
falsepublic int getCodePoint()
public int getDirection()
public java.lang.String getUnicodeName()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isDigit()
true, if the code is a digit, otherwise
falsepublic boolean isLetter()
true, if the code is a letter, otherwise
falsepublic boolean isPrintable()
true, if the code is printable, otherwise
falsepublic UnicodeChar lower()
(this method does not use the
public java.lang.String toString()
toString in class java.lang.Objectpublic UnicodeChar upper()
(this method does not use the
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||