|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<BinaryOp>
com.google.dexmaker.BinaryOp
public enum BinaryOp
An operation on two values of the same type.
Math operations (ADD, SUBTRACT, MULTIPLY,
DIVIDE, and REMAINDER) support ints, longs, floats and
doubles.
Bit operations (AND, OR, XOR, SHIFT_LEFT, SHIFT_RIGHT, UNSIGNED_SHIFT_RIGHT) support
ints and longs.
Division by zero behaves differently depending on the operand type.
For int and long operands, DIVIDE and REMAINDER throw
ArithmeticException if b == 0. For float and double operands,
the operations return NaN.
| Enum Constant Summary | |
|---|---|
ADD
a + b |
|
AND
a & b |
|
DIVIDE
a / b |
|
MULTIPLY
a * b |
|
OR
a | b |
|
REMAINDER
a % b |
|
SHIFT_LEFT
a << b |
|
SHIFT_RIGHT
a >> b |
|
SUBTRACT
a - b |
|
UNSIGNED_SHIFT_RIGHT
a >>> b |
|
XOR
a ^ b |
|
| Method Summary | |
|---|---|
static BinaryOp |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static BinaryOp[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final BinaryOp ADD
a + b
public static final BinaryOp SUBTRACT
a - b
public static final BinaryOp MULTIPLY
a * b
public static final BinaryOp DIVIDE
a / b
public static final BinaryOp REMAINDER
a % b
public static final BinaryOp AND
a & b
public static final BinaryOp OR
a | b
public static final BinaryOp XOR
a ^ b
public static final BinaryOp SHIFT_LEFT
a << b
public static final BinaryOp SHIFT_RIGHT
a >> b
public static final BinaryOp UNSIGNED_SHIFT_RIGHT
a >>> b
| Method Detail |
|---|
public static BinaryOp[] values()
for (BinaryOp c : BinaryOp.values()) System.out.println(c);
public static BinaryOp valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||