Package org.aoju.bus.core.text.escape
Class NumericEscaper
java.lang.Object
org.aoju.bus.core.text.translate.CharSequenceTranslator
org.aoju.bus.core.text.translate.CodePointTranslator
org.aoju.bus.core.text.escape.NumericEscaper
Translates codepoints to their XML numeric entity escaped value.
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NumericEscaperabove(int codepoint) Constructs aNumericEscaperabove the specified value (exclusive).static NumericEscaperbelow(int codepoint) Constructs aNumericEscaperbelow the specified value (exclusive).static NumericEscaperbetween(int codepointLow, int codepointHigh) Constructs aNumericEscaperbetween the specified values (inclusive).static NumericEscaperoutsideOf(int codepointLow, int codepointHigh) Constructs aNumericEscaperoutside of the specified values (exclusive).booleanMethods inherited from class org.aoju.bus.core.text.translate.CodePointTranslator
translateMethods inherited from class org.aoju.bus.core.text.translate.CharSequenceTranslator
hex, translate, translate, with
-
Constructor Details
-
NumericEscaper
public NumericEscaper()Constructs a
NumericEscaperfor all characters.
-
-
Method Details
-
below
Constructs a
NumericEscaperbelow the specified value (exclusive).- Parameters:
codepoint- below which to escape- Returns:
- the newly created
NumericEscaperinstance
-
above
Constructs a
NumericEscaperabove the specified value (exclusive).- Parameters:
codepoint- above which to escape- Returns:
- the newly created
NumericEscaperinstance
-
between
Constructs a
NumericEscaperbetween the specified values (inclusive).- Parameters:
codepointLow- above which to escapecodepointHigh- below which to escape- Returns:
- the newly created
NumericEscaperinstance
-
outsideOf
Constructs a
NumericEscaperoutside of the specified values (exclusive).- Parameters:
codepointLow- below which to escapecodepointHigh- above which to escape- Returns:
- the newly created
NumericEscaperinstance
-
translate
- Specified by:
translatein classCodePointTranslator- Throws:
IOException
-