public class EntityMap
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String[] |
entityKeys |
protected static java.lang.String[] |
entityReplacements |
protected static java.util.HashMap<java.lang.String,java.lang.String> |
map |
protected static java.util.List<java.util.regex.Pattern> |
patterns |
Constructor and Description |
---|
EntityMap() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
get(java.lang.String key)
Returns tne Java equivalent of an entity or a named character reference.
|
protected static java.lang.String |
getNextEntity(java.lang.String source,
int regionStart)
Search a string for the next occurrence of an entity.
|
static java.lang.String |
replaceAll(java.lang.String source)
Replaces all entities and character references in a specified string.
|
protected static java.lang.String[] entityKeys
protected static final java.lang.String[] entityReplacements
protected static final java.util.HashMap<java.lang.String,java.lang.String> map
protected static final java.util.List<java.util.regex.Pattern> patterns
public static java.lang.String get(java.lang.String key)
key
- the entity or character reference.protected static java.lang.String getNextEntity(java.lang.String source, int regionStart)
source
- String to search.regionStart
- Position in the string at which to start searching.null
if no entity could be matched.public static java.lang.String replaceAll(java.lang.String source)
source
- the input string.