public enum SymbolToken extends Enum<SymbolToken> implements Token
Token.TokenType| Enum Constant and Description |
|---|
Comma |
CurlyLeft |
CurlyRight |
Dot |
DoubleQuote |
Equals |
Newline |
SingleQuote |
SquareLeft |
SquareRight |
| Modifier and Type | Method and Description |
|---|---|
static SymbolToken |
getSymbolToken(char c)
returns the SymbolToken for the symbol c if exists, otherwise null
|
Token.TokenType |
getType() |
String |
toString() |
static SymbolToken |
valueOf(char c)
returns the SymbolToken for the symbol c if exists, otherwise throws an IllegalArgumentException
|
static SymbolToken |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SymbolToken[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SymbolToken CurlyLeft
public static final SymbolToken CurlyRight
public static final SymbolToken SquareLeft
public static final SymbolToken SquareRight
public static final SymbolToken Dot
public static final SymbolToken Comma
public static final SymbolToken Equals
public static final SymbolToken SingleQuote
public static final SymbolToken DoubleQuote
public static final SymbolToken Newline
public static SymbolToken[] values()
for (SymbolToken c : SymbolToken.values()) System.out.println(c);
public static SymbolToken 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 Token.TokenType getType()
public String toString()
toString in class Enum<SymbolToken>public static SymbolToken getSymbolToken(char c)
c - public static SymbolToken valueOf(char c) throws IllegalArgumentException
c - IllegalArgumentException - if there is no symbol token for the character cCopyright © 2017. All rights reserved.