Package one.microstream.chars
Class EscapeHandler.Default
java.lang.Object
one.microstream.chars.EscapeHandler.Default
- All Implemented Interfaces:
EscapeHandler
,ThreadSafe
,HashImmutable
,Immutable
,Stateless
- Enclosing interface:
- EscapeHandler
public static final class EscapeHandler.Default extends Object implements EscapeHandler, Stateless
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.chars.EscapeHandler
EscapeHandler.Default
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description void
handleEscapedChar(char escapedChar, VarString literalBuilder)
boolean
needsEscaping(char chr)
char
transformEscapedChar(char chr)
Transforms the given character on demand.char
unescape(char chr)
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
unescape
public final char unescape(char chr)- Specified by:
unescape
in interfaceEscapeHandler
-
handleEscapedChar
- Specified by:
handleEscapedChar
in interfaceEscapeHandler
-
needsEscaping
public final boolean needsEscaping(char chr)- Specified by:
needsEscaping
in interfaceEscapeHandler
-
transformEscapedChar
public final char transformEscapedChar(char chr)Description copied from interface:EscapeHandler
Transforms the given character on demand. Following escaped characters are transformed:- '\t' -> 't'
- '\b' -> 'b'
- '\n' -> 'n'
- '\r' -> 'r'
- '\f' -> 'f'
- Specified by:
transformEscapedChar
in interfaceEscapeHandler
- Parameters:
chr
- the character to uneescape- Returns:
- the unescaped value
-