public enum BinaryOperator extends Enum<BinaryOperator>
| Enum Constant and Description |
|---|
Add
binary + operator.
|
And
binary & operator.
|
Divide
binary / operator.
|
Modulo
binary % operator.
|
Multiply
binary * operator.
|
Or
binary | operator.
|
Power
binary exponent operator (leftright).
|
ShiftLeft
binary << operator (
left << right). |
ShiftRight
binary >> operator (
left >> right). |
Subtract
binary - operator.
|
Xor
binary ^ operator.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Number |
eval(Number left,
Number right)
Evaluates the operator.
|
static BinaryOperator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BinaryOperator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BinaryOperator Add
public static final BinaryOperator And
public static final BinaryOperator Subtract
public static final BinaryOperator Multiply
public static final BinaryOperator Divide
public static final BinaryOperator Modulo
public static final BinaryOperator Or
public static final BinaryOperator Power
public static final BinaryOperator ShiftLeft
left << right).public static final BinaryOperator ShiftRight
left >> right).public static final BinaryOperator Xor
public static BinaryOperator[] values()
for (BinaryOperator c : BinaryOperator.values()) System.out.println(c);
public static BinaryOperator valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2023 Streamx. All rights reserved.