public class JavaUnicodeEscaper extends UnicodeEscaper
| Constructor and Description |
|---|
JavaUnicodeEscaper(int below,
int above,
boolean between)
Constructs a
JavaUnicodeEscaper for the specified range. |
| Modifier and Type | Method and 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 String |
toUtf16Escape(int codePoint)
Converts the given code point to a hex string of the form
"\\uXXXX\\uXXXX". |
translatetranslatehex, translate, translate, withpublic JavaUnicodeEscaper(int below, int above, boolean between)
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 code point boundaryabove - int value representing the highest code point boundarybetween - whether to escape between the boundaries or outside thempublic static JavaUnicodeEscaper above(int codePoint)
JavaUnicodeEscaper above the specified value (exclusive).codePoint - above which to escapeUnicodeEscaper instancepublic static JavaUnicodeEscaper below(int codePoint)
JavaUnicodeEscaper below the specified value (exclusive).codePoint - below which to escapeUnicodeEscaper instancepublic static JavaUnicodeEscaper between(int codePointLow, int codePointHigh)
JavaUnicodeEscaper between the specified values (inclusive).codePointLow - above which to escapecodePointHigh - below which to escapeUnicodeEscaper instancepublic static JavaUnicodeEscaper outsideOf(int codePointLow, int codePointHigh)
JavaUnicodeEscaper outside of the specified values (exclusive).codePointLow - below which to escapecodePointHigh - above which to escapeUnicodeEscaper instanceprotected String toUtf16Escape(int codePoint)
"\\uXXXX\\uXXXX".toUtf16Escape in class UnicodeEscapercodePoint - a Unicode code pointCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.