Top Fields Constructors Methods
org.snakeyaml.engine.v2.common

public final Class CharConstants

extends Object
Class Inheritance
Imports
java.util.Arrays, .Collections, .HashMap, .Map

Field Summary

Modifier and TypeField and Description
public static final CharConstants
private static final String
private static final int
pack-priv boolean[]
public static final Map<Character, Integer>
ESCAPE_CODES

A mapping from a character to a number of bytes to read-ahead for that escape sequence.

public static final Map<Character, String>
ESCAPE_REPLACEMENTS

A mapping from an escaped character in the input stream to the character that they should be replaced with.

private static final String
public static final CharConstants
private static final String
public static final CharConstants
private static final String
public static final CharConstants
public static final CharConstants
private static final String
private static final String
public static final CharConstants
private static final String
public static final CharConstants
public static final CharConstants
private static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

the same string or its escaped representation
escapeChar
(String
- the char to escape
chRepresentation
)

Replace a single character with its string representation

public boolean
has(int c)

public boolean
has(int c, String additional)

public boolean
hasNo(int c)

public boolean
hasNo(int c, String additional)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALPHAback to summary
public static final CharConstants ALPHA
ALPHA_Sback to summary
private static final String ALPHA_S
ASCII_SIZEback to summary
private static final int ASCII_SIZE
containsback to summary
pack-priv boolean[] contains
ESCAPE_CODESback to summary
public static final Map<Character, 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
ESCAPE_REPLACEMENTSback to summary
public static final Map<Character, 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.

FULL_LINEBR_Sback to summary
private static final String FULL_LINEBR_S
LINEBRback to summary
public static final CharConstants LINEBR
LINEBR_Sback to summary
private static final String LINEBR_S
NULL_BL_LINEBRback to summary
public static final CharConstants NULL_BL_LINEBR
NULL_BL_LINEBR_Sback to summary
private static final String NULL_BL_LINEBR_S
NULL_BL_Tback to summary
public static final CharConstants NULL_BL_T
NULL_BL_T_LINEBRback to summary
public static final CharConstants NULL_BL_T_LINEBR
NULL_BL_T_LINEBR_Sback to summary
private static final String NULL_BL_T_LINEBR_S
NULL_BL_T_Sback to summary
private static final String NULL_BL_T_S
NULL_OR_LINEBRback to summary
public static final CharConstants NULL_OR_LINEBR
NULL_OR_LINEBR_Sback to summary
private static final String NULL_OR_LINEBR_S
URI_CHARS_FOR_TAG_PREFIXback to summary
public static final CharConstants URI_CHARS_FOR_TAG_PREFIX
URI_CHARS_FOR_TAG_SUFFIXback to summary
public static final CharConstants URI_CHARS_FOR_TAG_SUFFIX
URI_CHARS_SUFFIX_Sback to summary
private static final String URI_CHARS_SUFFIX_S

Constructor Detail

CharConstantsback to summary
private CharConstants(String content)

Method Detail

escapeCharback to summary
public static String escapeChar(String chRepresentation)

Replace a single character with its string representation

Parameters
chRepresentation:String

- the char to escape

Returns:String

the same string or its escaped representation

hasback to summary
public boolean has(int c)
hasback to summary
public boolean has(int c, String additional)
hasNoback to summary
public boolean hasNo(int c)
hasNoback to summary
public boolean hasNo(int c, String additional)