edu.cmu.cs.crystal.tac.model
Enum UnaryOperator
java.lang.Object
java.lang.Enum<UnaryOperator>
edu.cmu.cs.crystal.tac.model.UnaryOperator
- All Implemented Interfaces:
- Serializable, Comparable<UnaryOperator>
public enum UnaryOperator
- extends Enum<UnaryOperator>
Unary operators. Notice that + (plus) and - (minus) can also be BinaryOperator
s.
- Author:
- Kevin Bierhoff
Field Summary |
String |
token
Token representing the operator in source code, such as +, !=, or >>. |
ARIT_PLUS
public static final UnaryOperator ARIT_PLUS
ARIT_MINUS
public static final UnaryOperator ARIT_MINUS
BITWISE_COMPLEMENT
public static final UnaryOperator BITWISE_COMPLEMENT
BOOL_NOT
public static final UnaryOperator BOOL_NOT
token
public String token
- Token representing the operator in source code, such as +, !=, or >>.
values
public static final UnaryOperator[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(UnaryOperator c : UnaryOperator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static UnaryOperator valueOf(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:
IllegalArgumentException
- if this enum type has no constant
with the specified name
toString
public String toString()
- Overrides:
toString
in class Enum<UnaryOperator>