panda.lang.escape.NumericEntityUnescaper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of panda-core Show documentation
Show all versions of panda-core Show documentation
Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.
package panda.lang.escape;
import java.io.IOException;
import java.util.EnumSet;
import panda.lang.Arrays;
/**
* Translate XML numeric entities of the form [xX]?\d+;? to
* the specific codepoint.
*
* Note that the semi-colon is optional.
*
*/
public class NumericEntityUnescaper extends CharSequenceTranslator {
public static enum OPTION {
semiColonRequired, semiColonOptional, errorIfNoSemiColon
}
// TODO?: Create an OptionsSet class to hide some of the conditional logic below
private final EnumSet