public enum IntegerBinaryArithmeticOperation extends java.lang.Enum<IntegerBinaryArithmeticOperation> implements Operation
| Enum Constant and Description |
|---|
DIVIDE
Decimal divide.
|
MINUS
Decimal minus.
|
MODULO
Decimal modulo.
|
PLUS
Decimal plus.
|
TIMES
Decimal times.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Decimal |
exec(Decimal left,
Decimal right,
InterpreterStackTrace stackTrace)
Executes the operation with the operands interpreted.
|
Decimal |
execute(Interpreter interpreter,
java.util.List<Expression> args,
boolean variadicArgAsList,
InterpreterStackTrace stackTrace)
Executes the expression.
|
Decimal |
execute(Namespace namespace,
java.lang.String operation,
Decimal left,
Decimal right) |
static IntegerBinaryArithmeticOperation |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static IntegerBinaryArithmeticOperation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final IntegerBinaryArithmeticOperation PLUS
public static final IntegerBinaryArithmeticOperation MINUS
public static final IntegerBinaryArithmeticOperation TIMES
public static final IntegerBinaryArithmeticOperation DIVIDE
public static final IntegerBinaryArithmeticOperation MODULO
public static IntegerBinaryArithmeticOperation[] values()
for (IntegerBinaryArithmeticOperation c : IntegerBinaryArithmeticOperation.values()) System.out.println(c);
public static IntegerBinaryArithmeticOperation 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 Decimal execute(Interpreter interpreter, java.util.List<Expression> args, boolean variadicArgAsList, InterpreterStackTrace stackTrace) throws ErrorException
Operationexecute in interface OperationvariadicArgAsList - if true, the variadic argument is given as expression
returning a list; if false, the variadic argument
is given as several individual expressionsstackTrace - a stack trace passed to the interpreterErrorExceptionpublic Decimal execute(Namespace namespace, java.lang.String operation, Decimal left, Decimal right) throws ErrorException
ErrorExceptionprotected abstract Decimal exec(Decimal left, Decimal right, InterpreterStackTrace stackTrace) throws ErrorException
left - right - stackTrace - ErrorExceptionCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.