public enum Paren extends Enum<Paren>
| Enum Constant and Description |
|---|
BRACES |
BRACKET |
PARENTHESES |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isLeftParen(char token)
Judge passed token is left paren or not.
|
static boolean |
match(char leftToken,
char rightToken)
Judge left paren match right paren or not.
|
static Paren |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Paren[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Paren PARENTHESES
public static final Paren BRACKET
public static final Paren BRACES
public static Paren[] values()
for (Paren c : Paren.values()) System.out.println(c);
public static Paren 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 static boolean isLeftParen(char token)
token - tokenpublic static boolean match(char leftToken,
char rightToken)
leftToken - left tokenrightToken - right tokenCopyright © 2020 The Apache Software Foundation. All rights reserved.