Interface MapSerializerUtil.EscapeInfoProvider2
-
- All Known Subinterfaces:
StringUtil.EscapeInfoProvider2
- Enclosing class:
- MapSerializerUtil
public static interface MapSerializerUtil.EscapeInfoProvider2
String escaping info provider.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
escape(char c)
Converts character to its representation in the final stringchar
escapeCharacter()
Escape character to use before escaped characters (before character representations generated byescape(char)
method)MapSerializerUtil.UnescapeResult
unescape(String str, int startPos)
Converts character representation to original character
-
-
-
Method Detail
-
escape
@Nullable String escape(char c)
Converts character to its representation in the final string- Parameters:
c
- character to convert- Returns:
- character representation (without escape character) or null if conversion is not applicable to that character
-
unescape
@Nullable MapSerializerUtil.UnescapeResult unescape(@NotNull String str, int startPos)
Converts character representation to original character- Parameters:
str
- full stringstartPos
- character representation start position (the next position after escape character)- Returns:
- unescape result (character itself with the length of its representation) or null if conversion is not applicable
-
escapeCharacter
char escapeCharacter()
Escape character to use before escaped characters (before character representations generated byescape(char)
method)- Returns:
- see above
-
-