Package org.htmlcleaner
Class SpecialEntity
- java.lang.Object
-
- org.htmlcleaner.SpecialEntity
-
public class SpecialEntity extends java.lang.ObjectThis class contains map with special entities used in HTML and their unicodes.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Map<java.lang.String,SpecialEntity>entitiesprivate intintCodeprivate java.lang.Stringkeyprivate static intmaxEntityLength
-
Constructor Summary
Constructors Modifier Constructor Description privateSpecialEntity(java.lang.String key, int intCode)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddEntity(java.lang.String entityName, int intCode)Add new entity to the set.chargetCharacter()java.lang.StringgetDecimalNCR()static SpecialEntitygetEntity(java.lang.String key)java.lang.StringgetEscapedValue()java.lang.StringgetHexNCR()intgetIntCode()java.lang.StringgetKey()(package private) static intgetMaxEntityLength()
-
-
-
Field Detail
-
entities
private static java.util.Map<java.lang.String,SpecialEntity> entities
-
maxEntityLength
private static int maxEntityLength
-
key
private java.lang.String key
-
intCode
private int intCode
-
-
Method Detail
-
addEntity
public static void addEntity(java.lang.String entityName, int intCode) throws HtmlCleanerExceptionAdd new entity to the set.- Parameters:
entityName- Entity name, for example "pound"intCode- Unicode of the entity, for example 163- Throws:
HtmlCleanerException
-
getEntity
public static SpecialEntity getEntity(java.lang.String key)
-
getMaxEntityLength
static int getMaxEntityLength()
-
getKey
public java.lang.String getKey()
-
getIntCode
public int getIntCode()
-
getCharacter
public char getCharacter()
-
getDecimalNCR
public java.lang.String getDecimalNCR()
- Returns:
- Numeric Character Reference in decimal format
-
getHexNCR
public java.lang.String getHexNCR()
- Returns:
- Numeric Character Reference in hex format
-
getEscapedValue
public java.lang.String getEscapedValue()
- Returns:
- Escaped value of the entity
-
-