public enum Op2 extends java.lang.Enum<Op2> implements WithBytecode
| Enum Constant and Description |
|---|
AND
Logical AND operation.
|
DIFFERS
Inequality comparison operation.
|
DIVIDE
Arithmetic division operation.
|
EQUALS
Equality comparison operation.
|
GREATER
Greater-than comparison operation.
|
GREATER_EQUAL
Greater-than-or-equal comparison operation.
|
MAX
Maximum of two numbers or other Comparable objects.
|
MIN
Minimum of two numbers or other Comparable objects.
|
MINUS
Arithmetic subtraction operation.
|
MODULUS
Modulus operation.
|
OR
Logical OR operation.
|
PLUS
Arithmetic addition operation.
|
POWER
Exponent operation.
|
SMALLER
Less-than comparison operation.
|
SMALLER_EQUAL
Less-than-or-equal comparison operation.
|
TIMES
Arithmetic multiplication operation.
|
| Modifier and Type | Method and Description |
|---|---|
Bytecode |
getBytecode() |
java.util.function.BinaryOperator<java.lang.Object> |
getFunction() |
static Op2 |
getOp(java.lang.String name)
Translates a name into an operator.
|
java.lang.Object |
run(java.lang.Object a,
java.lang.Object b)
Compute the value of applying the two-argument operator to inputs a and
b.
|
java.lang.String |
toString() |
static Op2 |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Op2[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Op2 AND
public static final Op2 DIFFERS
public static final Op2 DIVIDE
public static final Op2 EQUALS
public static final Op2 GREATER
public static final Op2 GREATER_EQUAL
public static final Op2 MAX
public static final Op2 MIN
public static final Op2 MINUS
public static final Op2 MODULUS
public static final Op2 OR
public static final Op2 PLUS
public static final Op2 POWER
public static final Op2 SMALLER
public static final Op2 SMALLER_EQUAL
public static final Op2 TIMES
public static Op2[] values()
for (Op2 c : Op2.values()) System.out.println(c);
public static Op2 valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.util.function.BinaryOperator<java.lang.Object> getFunction()
public java.lang.Object run(java.lang.Object a,
java.lang.Object b)
a - First inputb - Second inputpublic java.lang.String toString()
toString in class java.lang.Enum<Op2>public static Op2 getOp(java.lang.String name)
name - operator nameOp2public Bytecode getBytecode()
getBytecode in interface WithBytecodeBytecode