public class NamedCharacter
extends java.lang.Object
Constructor and Description |
---|
NamedCharacter(java.lang.String charName)
Simple constructor.
|
NamedCharacter(java.lang.String charName,
java.lang.String unicodeSequence)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getName()
Returns the character name (as defined by the Adobe glyph list).
|
char |
getSingleUnicodeValue()
Returns the single Unicode value associated with this named character.
|
java.lang.String |
getUnicodeSequence()
Returns the Unicode sequence associated with this character.
|
int |
hashCode() |
boolean |
hasSingleUnicodeValue()
Indicates whether a single Unicode value is associated with this character.
|
java.lang.String |
toString() |
public NamedCharacter(java.lang.String charName, java.lang.String unicodeSequence)
charName
- the character nameunicodeSequence
- the Unicode sequence associated with this characterpublic NamedCharacter(java.lang.String charName)
charName
- the character namepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getName()
public java.lang.String getUnicodeSequence()
public boolean hasSingleUnicodeValue()
public char getSingleUnicodeValue() throws java.lang.IllegalStateException
hasSingleUnicodeValue()
before you call this method because an
IllegalStateException is thrown is a Unicode sequence with more than one character is
associated with this character.java.lang.IllegalStateException
- if a Unicode sequence with more than one value is associated
with the named characterpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.