public abstract class DoubleOperator
extends java.lang.Object
Basic for type double
.
Constructor and Description |
---|
DoubleOperator() |
Modifier and Type | Method and Description |
---|---|
static double |
add(double left,
double right)
Return
left + right . |
static int |
compare(double left,
double right)
Compare
left operand with right operand. |
static double |
divide(double left,
double right)
Return
left / right . |
static boolean |
equal(double left,
double right)
Compare
left operand with right operand. |
static boolean |
greaterEqual(double left,
double right)
Compare
left operand with right operand. |
static boolean |
greaterThan(double left,
double right)
Compare
left operand with right operand. |
static boolean |
lessEqual(double left,
double right)
Compare
left operand with right operand. |
static boolean |
lessThan(double left,
double right)
Compare
left operand with right operand. |
static double |
multiply(double left,
double right)
Return
left * right . |
static double |
negate(double value)
Return
-value . |
static boolean |
notEqual(double left,
double right)
Compare
left operand with right operand. |
static double |
remainder(double left,
double right)
Return
left % right . |
static double |
subtract(double left,
double right)
Return
left - right . |
public static double add(double left, double right)
Return left + right
.
OverflowException
if the result is out of range for type double
.
left
- Left operand.right
- Right operand.public static int compare(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.left < right
, zero result if left == right
, positive result if left > right
.public static double divide(double left, double right)
Return left / right
.
OverflowException
if the result is out of range for type double
.
left
- Left operand.right
- Right operand.public static boolean equal(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left == right
, false
if left != right
.public static boolean greaterEqual(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left >= right
, false
otherwise.public static boolean greaterThan(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left > right
, false
otherwise.public static boolean lessEqual(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left <= right
, false
otherwise.public static boolean lessThan(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left < right
, false
otherwise.public static double multiply(double left, double right)
Return left * right
.
OverflowException
if the result is out of range for type double
.
left
- Left operand.right
- Right operand.public static double negate(double value)
Return -value
.
OverflowException
if the result is out of range for type double
.
value
- Operand value.public static boolean notEqual(double left, double right)
Compare left
operand with right
operand.
left
- Left operand.right
- Right operand.true
if left != right
, false
if left == right
.public static double remainder(double left, double right)
Return left % right
.
OverflowException
if the result is out of range for type double
.
left
- Left operand.right
- Right operand.public static double subtract(double left, double right)
Return left - right
.
OverflowException
if the result is out of range for type double
.
left
- Left operand.right
- Right operand.