public enum Tokens extends Enum<Tokens> implements Token
Token
s.Enum Constant and Description |
---|
ALPHA
upper or lower case alpha character
|
AT_RULE
at symbol
|
CLOSE_BRACE
closing brace }
|
CLOSE_BRACKET
closing bracket ]
|
CLOSE_PAREN
closing parenthesis )
|
COLON
a regular colon
|
COMMA
comma
|
DIGIT
numerical digit
|
DOT
dot, period, full-stop, etc...
|
DOUBLE_QUOTE
double quote
|
ESCAPE
CSS escape character
|
EXCLAMATION
exclamation
|
FORWARD_SLASH
forward slash
|
GREATER_THAN
greater than character, usually for the combinator symbol
|
HASH
hash mark
|
HEX_COLOR
color in hex format
|
HEXIDECIMAL
hexidecimal number
|
HYPHEN
hyphen/minus/dash
|
HYPHEN_OR_DIGIT
hyphen or digit
|
NEVER_MATCH
a token that never matches
|
NEWLINE
newline character
|
NMCHAR
subsequent allowed characters in a css ident/name (ordered based on likelihood of occurrence)
|
NMSTART
first allowed character in a css ident/name (ordered based on likelihood of occurrence)
|
OPEN_BRACE
open brace {
|
OPEN_BRACKET
opening bracket [
|
OPEN_PAREN
opening parenthesis (
|
PERCENTAGE
percentage symbol
|
PIPE
pipe character
|
PLUS
plus character, usually for the combinator symbol
|
QUESTION
question mark
|
SEMICOLON
a semicolon
|
SIGN
negative or positive sign
|
SINGLE_QUOTE
single quote
|
STAR
asterisk
|
TILDE
tilde character, usually for the combinator symbol
|
U
u (unicode-range delimiter)
|
WHITESPACE
whitespace as defined by the CSS spec (except form feed)
|
Modifier and Type | Method and Description |
---|---|
String |
description()
Gets a description of the token.
|
boolean |
matches(char c)
Whether the given character matchers this
Token . |
Token |
or(Token other)
A Utility to create a new
CompoundToken , combining this Token with another one. |
static Tokens |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Tokens[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Tokens ALPHA
public static final Tokens DIGIT
public static final Tokens DOT
public static final Tokens HYPHEN
public static final Tokens SEMICOLON
public static final Tokens COLON
public static final Tokens COMMA
public static final Tokens OPEN_BRACE
public static final Tokens CLOSE_BRACE
public static final Tokens OPEN_PAREN
public static final Tokens CLOSE_PAREN
public static final Tokens OPEN_BRACKET
public static final Tokens CLOSE_BRACKET
public static final Tokens STAR
public static final Tokens HASH
public static final Tokens AT_RULE
public static final Tokens PLUS
public static final Tokens TILDE
public static final Tokens GREATER_THAN
public static final Tokens FORWARD_SLASH
public static final Tokens PERCENTAGE
public static final Tokens EXCLAMATION
public static final Tokens QUESTION
public static final Tokens U
public static final Tokens DOUBLE_QUOTE
public static final Tokens SINGLE_QUOTE
public static final Tokens PIPE
public static final Tokens NEWLINE
public static final Tokens ESCAPE
public static final Tokens WHITESPACE
public static final Tokens SIGN
public static final Tokens HEX_COLOR
public static final Tokens HEXIDECIMAL
public static final Tokens NMSTART
public static final Tokens NMCHAR
public static final Tokens HYPHEN_OR_DIGIT
public static final Tokens NEVER_MATCH
public static Tokens[] values()
for (Tokens c : Tokens.values()) System.out.println(c);
public static Tokens valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean matches(char c)
Token
Token
.public String description()
Token
description
in interface Token
public Token or(Token other)
Token
CompoundToken
, combining this Token
with another one. This is useful for OR
character comparisons.or
in interface Token
other
- The other Token
.CompoundToken
instance.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.