Package org.snakeyaml.engine.v2.common
Class CharConstants
- java.lang.Object
-
- org.snakeyaml.engine.v2.common.CharConstants
-
public final class CharConstants extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static CharConstantsALPHAprivate static java.lang.StringALPHA_Sprivate static intASCII_SIZE(package private) boolean[]containsstatic java.util.Map<java.lang.Character,java.lang.Integer>ESCAPE_CODESA mapping from a character to a number of bytes to read-ahead for that escape sequence.static java.util.Map<java.lang.Character,java.lang.String>ESCAPE_REPLACEMENTSA mapping from an escaped character in the input stream to the character that they should be replaced with.private static java.lang.StringFULL_LINEBR_Sstatic CharConstantsLINEBRprivate static java.lang.StringLINEBR_Sstatic CharConstantsNULL_BL_LINEBRprivate static java.lang.StringNULL_BL_LINEBR_Sstatic CharConstantsNULL_BL_Tstatic CharConstantsNULL_BL_T_LINEBRprivate static java.lang.StringNULL_BL_T_LINEBR_Sprivate static java.lang.StringNULL_BL_T_Sstatic CharConstantsNULL_OR_LINEBRprivate static java.lang.StringNULL_OR_LINEBR_Sstatic CharConstantsURI_CHARS_FOR_TAG_PREFIXstatic CharConstantsURI_CHARS_FOR_TAG_SUFFIXprivate static java.lang.StringURI_CHARS_SUFFIX_S
-
Constructor Summary
Constructors Modifier Constructor Description privateCharConstants(java.lang.String content)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.StringescapeChar(java.lang.String chRepresentation)Replace a single character with its string representationbooleanhas(int c)booleanhas(int c, java.lang.String additional)booleanhasNo(int c)booleanhasNo(int c, java.lang.String additional)
-
-
-
Field Detail
-
ALPHA_S
private static final java.lang.String ALPHA_S
- See Also:
- Constant Field Values
-
LINEBR_S
private static final java.lang.String LINEBR_S
- See Also:
- Constant Field Values
-
FULL_LINEBR_S
private static final java.lang.String FULL_LINEBR_S
- See Also:
- Constant Field Values
-
NULL_OR_LINEBR_S
private static final java.lang.String NULL_OR_LINEBR_S
- See Also:
- Constant Field Values
-
NULL_BL_LINEBR_S
private static final java.lang.String NULL_BL_LINEBR_S
- See Also:
- Constant Field Values
-
NULL_BL_T_LINEBR_S
private static final java.lang.String NULL_BL_T_LINEBR_S
- See Also:
- Constant Field Values
-
NULL_BL_T_S
private static final java.lang.String NULL_BL_T_S
- See Also:
- Constant Field Values
-
URI_CHARS_SUFFIX_S
private static final java.lang.String URI_CHARS_SUFFIX_S
- See Also:
- Constant Field Values
-
LINEBR
public static final CharConstants LINEBR
-
NULL_OR_LINEBR
public static final CharConstants NULL_OR_LINEBR
-
NULL_BL_LINEBR
public static final CharConstants NULL_BL_LINEBR
-
NULL_BL_T_LINEBR
public static final CharConstants NULL_BL_T_LINEBR
-
NULL_BL_T
public static final CharConstants NULL_BL_T
-
URI_CHARS_FOR_TAG_PREFIX
public static final CharConstants URI_CHARS_FOR_TAG_PREFIX
-
URI_CHARS_FOR_TAG_SUFFIX
public static final CharConstants URI_CHARS_FOR_TAG_SUFFIX
-
ALPHA
public static final CharConstants ALPHA
-
ASCII_SIZE
private static final int ASCII_SIZE
- See Also:
- Constant Field Values
-
contains
boolean[] contains
-
ESCAPE_REPLACEMENTS
public static final java.util.Map<java.lang.Character,java.lang.String> ESCAPE_REPLACEMENTS
A mapping from an escaped character in the input stream to the character that they should be replaced with.YAML defines several common and a few uncommon escape sequences.
-
ESCAPE_CODES
public static final java.util.Map<java.lang.Character,java.lang.Integer> ESCAPE_CODES
A mapping from a character to a number of bytes to read-ahead for that escape sequence. These escape sequences are used to handle unicode escaping in the following formats, where H is a hexadecimal character:\xHH : escaped 8-bit Unicode character \uHHHH : escaped 16-bit Unicode character \UHHHHHHHH : escaped 32-bit Unicode character
-
-
Method Detail
-
has
public boolean has(int c)
-
hasNo
public boolean hasNo(int c)
-
has
public boolean has(int c, java.lang.String additional)
-
hasNo
public boolean hasNo(int c, java.lang.String additional)
-
escapeChar
public static java.lang.String escapeChar(java.lang.String chRepresentation)
Replace a single character with its string representation- Parameters:
chRepresentation- - the char to escape- Returns:
- the same string or its escaped representation
-
-