Package org.unbescape.css
Enum CssIdentifierEscapeType
- All Implemented Interfaces:
Serializable
,Comparable<CssIdentifierEscapeType>
,java.lang.constant.Constable
Types of escape operations to be performed on CSS identifiers:
- BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA: Use
backslash escapes whenever possible (depending on the specified
CssIdentifierEscapeLevel
). For escaped characters that do not have an associated backslash escape, default to using \FF* variable-length hexadecimal escapes. - BACKSLASH_ESCAPES_DEFAULT_TO_SIX_DIGIT_HEXA: Use
backslash escapes whenever possible (depending on the specified
CssIdentifierEscapeLevel
). For escaped characters that do not have an associated backslash escape, default to using \FFFFFF 6-digit hexadecimal escapes. - COMPACT_HEXA: Replace escaped characters with \FF* variable-length hexadecimal escapes.
- SIX_DIGIT_HEXA: Replace escaped characters with \FFFFFF 6-digit hexadecimal escapes.
For further information, see the Glossary and the References sections at the
documentation for the CssEscape
class.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionUse backslash escapes if possible, default to \FF* variable-length hexadecimal escapes.Use backslash escapes if possible, default to \FFFFFF 6-digit hexadecimal escapes.Always use \FF* variable-length hexadecimal escapes.Always use \FFFFFF 6-digit hexadecimal escapes. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
CssIdentifierEscapeType
(boolean useBackslashEscapes, boolean useCompactHexa) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
static CssIdentifierEscapeType
Returns the enum constant of this type with the specified name.static CssIdentifierEscapeType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BACKSLASH_ESCAPES_DEFAULT_TO_COMPACT_HEXA
Use backslash escapes if possible, default to \FF* variable-length hexadecimal escapes. -
BACKSLASH_ESCAPES_DEFAULT_TO_SIX_DIGIT_HEXA
Use backslash escapes if possible, default to \FFFFFF 6-digit hexadecimal escapes. -
COMPACT_HEXA
Always use \FF* variable-length hexadecimal escapes. -
SIX_DIGIT_HEXA
Always use \FFFFFF 6-digit hexadecimal escapes.
-
-
Field Details
-
useBackslashEscapes
private final boolean useBackslashEscapes -
useCompactHexa
private final boolean useCompactHexa
-
-
Constructor Details
-
CssIdentifierEscapeType
private CssIdentifierEscapeType(boolean useBackslashEscapes, boolean useCompactHexa)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getUseBackslashEscapes
public boolean getUseBackslashEscapes() -
getUseCompactHexa
public boolean getUseCompactHexa()
-