edu.cmu.cs.crystal.tac
Enum UnaryOperator
java.lang.Object
java.lang.Enum<UnaryOperator>
edu.cmu.cs.crystal.tac.UnaryOperator
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<UnaryOperator>
public enum UnaryOperator
- extends java.lang.Enum<UnaryOperator>
Unary operators. Notice that + (plus) and - (minus) can also be BinaryOperator
s.
- Author:
- Kevin Bierhoff
Field Summary |
java.lang.String |
token
Token representing the operator in source code, such as +, !=, or >>. |
Method Summary |
java.lang.String |
toString()
|
static UnaryOperator |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static UnaryOperator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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 java.lang.String token
- Token representing the operator in source code, such as +, !=, or >>.
values
public static UnaryOperator[] 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 (UnaryOperator c : UnaryOperator.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static UnaryOperator 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 name
java.lang.NullPointerException
- if the argument is null
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Enum<UnaryOperator>