gov.nasa.worldwind.util
Class EntityMap
java.lang.Object
gov.nasa.worldwind.util.EntityMap
public class EntityMap
- extends Object
Maps HTML entities and named character references to their Java equivalent.
|
Method Summary |
static String |
get(String key)
Returns tne Java equivalent of an entity or a named character reference. |
protected static String |
getNextEntity(String source,
int regionStart)
Search a string for the next occurrence of an entity. |
static String |
replaceAll(String source)
Replaces all entities and character references in a specified string. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
entityKeys
protected static String[] entityKeys
entityReplacements
protected static final String[] entityReplacements
map
protected static final HashMap<String,String> map
patterns
protected static final List<Pattern> patterns
EntityMap
public EntityMap()
get
public static String get(String key)
- Returns tne Java equivalent of an entity or a named character reference.
- Parameters:
key - the entity or character reference.
- Returns:
- the Java equivalent of the input, or null if the input string does not identify a known entity or
character reference.
getNextEntity
protected static String getNextEntity(String source,
int regionStart)
- Search a string for the next occurrence of an entity.
- Parameters:
source - String to search.regionStart - Position in the string at which to start searching.
- Returns:
- The entity that was matched, or
null if no entity could be matched.
replaceAll
public static String replaceAll(String source)
- Replaces all entities and character references in a specified string.
- Parameters:
source - the input string.
- Returns:
- the input string with all entities and references resolved. The input string is returned as-is if it
contains no entities or references.