public interface Operator
| Modifier and Type | Field and Description |
|---|---|
static Operator |
ABS_DIFF
Absolute difference operator, for arguments
a |
static Operator |
DIVIDE
Divide operator, for arguments
a |
static Operator |
MINUS
Minus operator, for arguments
a |
static Operator |
MULTIPLY
Multiply operator, for arguments
a |
static Operator |
PLUS
Plus operator, for arguments
a |
static Operator |
POW
Power operator, for arguments
a |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDescription()
Should return a description of what the operator does to be shown by the reporter.
|
double |
result(double operand1,
double operand2)
This should return the desired of the result or the operation, depending on the operands.
|
static final Operator PLUS
a and b returning a+b.static final Operator MINUS
a and b returning a-b.static final Operator MULTIPLY
a and b returning a-b.static final Operator DIVIDE
a and b returning a/b.static final Operator POW
a and b returning a^b.static final Operator ABS_DIFF
a and b returning |a-b|.double result(double operand1,
double operand2)
operand1 - operand2 - java.lang.String getDescription()