org.extex.core
Class ComposedUnicodeChar

java.lang.Object
  extended by org.extex.core.UnicodeChar
      extended by org.extex.core.ComposedUnicodeChar
All Implemented Interfaces:
java.io.Serializable

public class ComposedUnicodeChar
extends UnicodeChar

This class provides a Unicode character with some combing characters attached to it.

Version:
$Revision:5417 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Fields inherited from class org.extex.core.UnicodeChar
BREAK_PERMITTED_HERE, MAX_VALUE, MIN_VALUE, NEXT_LINE, NO_BREAK_HERE, NO_BREAK_SPACE, SHY, SPACE
 
Constructor Summary
protected ComposedUnicodeChar(int codePoint)
          Creates a new object from an integer code point and some combining characters.
protected ComposedUnicodeChar(int codePoint, int[] combining)
          Creates a new object from an integer code point and some combining characters.
 
Method Summary
 boolean equals(java.lang.Object unicodeChar)
          Compares a UnicodeChar character with the value of this object.
static ComposedUnicodeChar get(UnicodeChar uc, int comb)
          This is a factory method for combining Unicode characters.
protected  int[] getCombiningCodePoints()
          Getter for combining character's code points.
 int hashCode()
          Getter for the hash code.
 
Methods inherited from class org.extex.core.UnicodeChar
get, get, getCodePoint, getDirection, getUnicodeName, isDigit, isLetter, isPrintable, lower, toString, upper
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

ComposedUnicodeChar

protected ComposedUnicodeChar(int codePoint)
Creates a new object from an integer code point and some combining characters.

Parameters:
codePoint - the 32-bit code point

ComposedUnicodeChar

protected ComposedUnicodeChar(int codePoint,
                              int[] combining)
Creates a new object from an integer code point and some combining characters.

Parameters:
codePoint - the 32-bit code point
combining - the array of code points for the combining characters
Method Detail

get

public static ComposedUnicodeChar get(UnicodeChar uc,
                                      int comb)
This is a factory method for combining Unicode characters.

Parameters:
uc - he base Unicode character
comb - the combining mark
Returns:
the new combining Unicode character

equals

public boolean equals(java.lang.Object unicodeChar)
Compares a UnicodeChar character with the value of this object. They are considered equal if the are both ComposedUnicodeChars and have the same codes.

The general signature for comparison to an arbitrary object is required for the implementation of HashMap and friends.

Overrides:
equals in class UnicodeChar
Parameters:
unicodeChar - the character to compare
Returns:
true if the characters are equal, otherwise false

getCombiningCodePoints

protected int[] getCombiningCodePoints()
Getter for combining character's code points.

Returns:
the combining character's code points

hashCode

public int hashCode()
Getter for the hash code.

Overrides:
hashCode in class UnicodeChar
Returns:
the hash code
See Also:
UnicodeChar.hashCode()