Enum TokenOperator
- java.lang.Object
-
- java.lang.Enum<TokenOperator>
-
- net.sourceforge.plantuml.tim.expression.TokenOperator
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TokenOperator>
public enum TokenOperator extends java.lang.Enum<TokenOperator>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADDITION
DIVISION
EQUALS
GREATER_THAN
GREATER_THAN_OR_EQUALS
LESS_THAN
LESS_THAN_OR_EQUALS
LOGICAL_AND
LOGICAL_OR
MULTIPLICATION
NOT_EQUALS
SUBSTRACTION
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplay()
int
getPrecedence()
static TokenOperator
getTokenOperator(char ch, char ch2)
boolean
isLeftAssociativity()
abstract TValue
operate(TValue v1, TValue v2)
static TokenOperator
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TokenOperator[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MULTIPLICATION
public static final TokenOperator MULTIPLICATION
-
DIVISION
public static final TokenOperator DIVISION
-
ADDITION
public static final TokenOperator ADDITION
-
SUBSTRACTION
public static final TokenOperator SUBSTRACTION
-
LESS_THAN
public static final TokenOperator LESS_THAN
-
GREATER_THAN
public static final TokenOperator GREATER_THAN
-
LESS_THAN_OR_EQUALS
public static final TokenOperator LESS_THAN_OR_EQUALS
-
GREATER_THAN_OR_EQUALS
public static final TokenOperator GREATER_THAN_OR_EQUALS
-
EQUALS
public static final TokenOperator EQUALS
-
NOT_EQUALS
public static final TokenOperator NOT_EQUALS
-
LOGICAL_AND
public static final TokenOperator LOGICAL_AND
-
LOGICAL_OR
public static final TokenOperator LOGICAL_OR
-
-
Method Detail
-
values
public static TokenOperator[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TokenOperator c : TokenOperator.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TokenOperator valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
isLeftAssociativity
public boolean isLeftAssociativity()
-
getTokenOperator
public static TokenOperator getTokenOperator(char ch, char ch2)
-
getPrecedence
public final int getPrecedence()
-
getDisplay
public final java.lang.String getDisplay()
-
-