org.htmlparser.util
public class CharacterReference extends Object implements Serializable, Cloneable, Ordered
Character references are described at http://www.w3.org/TR/REC-html40/charset.html#entities Supports the Ordered interface so it's easy to create a list sorted by kernel, to perform binary searches on.
Field Summary | |
---|---|
protected int | mCharacter
The character value as an integer. |
protected String | mKernel
This entity reference kernel.
|
Constructor Summary | |
---|---|
CharacterReference(String kernel, int character)
Construct a CharacterReference with the character and kernel given. |
Method Summary | |
---|---|
int | compare(Object that)
Compare one reference to another. |
int | getCharacter()
Get the character needing translation. |
String | getKernel()
Get this CharacterReference's kernel. |
String | toString()
Visualize this character reference as a string. |
CharacterReference
with the character and kernel given.Parameters: kernel The kernel in the equivalent character entity reference. character The character needing encoding.
See Also: Ordered
Returns: The character.
Returns: The kernel in the equivalent character entity reference.
Returns: A string with the character and kernel.
HTML Parser is an open source library released under LGPL. | |