public class JavaUnicodeEscaper extends UnicodeEscaper
Constructor | Description |
---|---|
JavaUnicodeEscaper(int below,
int above,
boolean between) |
Constructs a
JavaUnicodeEscaper for the specified range. |
Modifier and Type | Method | Description |
---|---|---|
static JavaUnicodeEscaper |
above(int codepoint) |
Constructs a
JavaUnicodeEscaper above the specified value (exclusive). |
static JavaUnicodeEscaper |
below(int codepoint) |
Constructs a
JavaUnicodeEscaper below the specified value (exclusive). |
static JavaUnicodeEscaper |
between(int codepointLow,
int codepointHigh) |
Constructs a
JavaUnicodeEscaper between the specified values (inclusive). |
static JavaUnicodeEscaper |
outsideOf(int codepointLow,
int codepointHigh) |
Constructs a
JavaUnicodeEscaper outside of the specified values (exclusive). |
protected java.lang.String |
toUtf16Escape(int codepoint) |
Converts the given codepoint to a hex string of the form
"\\uXXXX\\uXXXX" |
hex, translate, translate, with
translate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
translate
public JavaUnicodeEscaper(int below, int above, boolean between)
Constructs a JavaUnicodeEscaper
for the specified range. This is the underlying method for the
other constructors/builders. The below
and above
boundaries are inclusive when
between
is true
and exclusive when it is false
.
below
- int value representing the lowest codepoint boundaryabove
- int value representing the highest codepoint boundarybetween
- whether to escape between the boundaries or outside thempublic static JavaUnicodeEscaper above(int codepoint)
Constructs a JavaUnicodeEscaper
above the specified value (exclusive).
codepoint
- above which to escapeUnicodeEscaper
instancepublic static JavaUnicodeEscaper below(int codepoint)
Constructs a JavaUnicodeEscaper
below the specified value (exclusive).
codepoint
- below which to escapeUnicodeEscaper
instancepublic static JavaUnicodeEscaper between(int codepointLow, int codepointHigh)
Constructs a JavaUnicodeEscaper
between the specified values (inclusive).
codepointLow
- above which to escapecodepointHigh
- below which to escapeUnicodeEscaper
instancepublic static JavaUnicodeEscaper outsideOf(int codepointLow, int codepointHigh)
Constructs a JavaUnicodeEscaper
outside of the specified values (exclusive).
codepointLow
- below which to escapecodepointHigh
- above which to escapeUnicodeEscaper
instanceprotected java.lang.String toUtf16Escape(int codepoint)
"\\uXXXX\\uXXXX"
toUtf16Escape
in class UnicodeEscaper
codepoint
- a Unicode code pointCopyright © 2001-2017 - Apache Software Foundation