Package org.apache.fop.fonts
Class NamedCharacter
java.lang.Object
org.apache.fop.fonts.NamedCharacter
Represents an named character with character name (from the Adobe glyph list) and a Unicode
sequence that this character represents.
-
Constructor Summary
ConstructorDescriptionNamedCharacter
(String charName) Simple constructor.NamedCharacter
(String charName, String unicodeSequence) Main constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getName()
Returns the character name (as defined by the Adobe glyph list).char
Returns the single Unicode value associated with this named character.Returns the Unicode sequence associated with this character.int
hashCode()
boolean
Indicates whether a single Unicode value is associated with this character.toString()
-
Constructor Details
-
NamedCharacter
Main constructor.- Parameters:
charName
- the character nameunicodeSequence
- the Unicode sequence associated with this character
-
NamedCharacter
Simple constructor.- Parameters:
charName
- the character name
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
getName
Returns the character name (as defined by the Adobe glyph list).- Returns:
- the character name
-
getUnicodeSequence
Returns the Unicode sequence associated with this character.- Returns:
- the Unicode sequence (or null if no Unicode sequence is associated)
-
hasSingleUnicodeValue
public boolean hasSingleUnicodeValue()Indicates whether a single Unicode value is associated with this character.- Returns:
- true if exactly one Unicode value is associated with this character, false otherwise
-
getSingleUnicodeValue
Returns the single Unicode value associated with this named character. CheckhasSingleUnicodeValue()
before you call this method because an IllegalStateException is thrown is a Unicode sequence with more than one character is associated with this character.- Returns:
- the single Unicode value (or FFFF ("NOT A CHARACTER") if no Unicode value is available)
- Throws:
IllegalStateException
- if a Unicode sequence with more than one value is associated with the named character
-
toString
-