public final class Double extends Number implements Comparable<Double>
double
as an object.Modifier and Type | Field and Description |
---|---|
static int |
BYTES |
static int |
MAX_EXPONENT |
static double |
MAX_VALUE |
static int |
MIN_EXPONENT |
static double |
MIN_NORMAL |
static double |
MIN_VALUE |
static double |
NaN |
static double |
NEGATIVE_INFINITY |
static double |
POSITIVE_INFINITY |
static int |
SIZE |
static Class<Double> |
TYPE |
Modifier and Type | Method and Description |
---|---|
protected static Double |
$create(double x) |
protected static Double |
$create(String s) |
protected static boolean |
$isInstance(Object instance) |
byte |
byteValue() |
static int |
compare(double x,
double y) |
int |
compareTo(Double b) |
static long |
doubleToLongBits(double value) |
double |
doubleValue() |
boolean |
equals(Object o) |
float |
floatValue() |
int |
hashCode()
Performance caution: using Double objects as map keys is not recommended.
|
static int |
hashCode(double d) |
int |
intValue() |
static boolean |
isFinite(double x) |
boolean |
isInfinite() |
static boolean |
isInfinite(double x) |
boolean |
isNaN() |
static boolean |
isNaN(double x) |
static double |
longBitsToDouble(long bits) |
long |
longValue() |
static double |
max(double a,
double b) |
static double |
min(double a,
double b) |
static double |
parseDouble(String s) |
short |
shortValue() |
static double |
sum(double a,
double b) |
String |
toString() |
static String |
toString(double b) |
static Double |
valueOf(double d) |
static Double |
valueOf(String s) |
__decodeAndValidateInt, __decodeNumberString, __parseAndValidateDouble, __parseAndValidateInt, __parseAndValidateLong
$isInstance
public static final double MAX_VALUE
public static final double MIN_VALUE
public static final double MIN_NORMAL
public static final int MAX_EXPONENT
public static final int MIN_EXPONENT
public static final double NaN
public static final double NEGATIVE_INFINITY
public static final double POSITIVE_INFINITY
public static final int SIZE
public static final int BYTES
public Double(double value)
public Double(String s)
public static int compare(double x, double y)
public static long doubleToLongBits(double value)
public static int hashCode(double d)
@JsMethod(namespace="<window>") public static boolean isFinite(double x)
public static boolean isInfinite(double x)
@JsMethod(namespace="<window>") public static boolean isNaN(double x)
public static double longBitsToDouble(long bits)
public static double max(double a, double b)
public static double min(double a, double b)
public static double parseDouble(String s) throws NumberFormatException
NumberFormatException
public static double sum(double a, double b)
public static String toString(double b)
public static Double valueOf(double d)
public static Double valueOf(String s) throws NumberFormatException
NumberFormatException
public int compareTo(Double b)
compareTo
in interface Comparable<Double>
public double doubleValue()
doubleValue
in class Number
public float floatValue()
floatValue
in class Number
public int hashCode()
doubleToIntBits
. As a result, this method
computes a hash code by truncating the whole number portion of the double,
which may lead to poor performance for certain value sets if Doubles are
used as keys in a HashMap
.public boolean isInfinite()
public boolean isNaN()
public short shortValue()
shortValue
in class Number
protected static Double $create(double x)
@JsMethod protected static boolean $isInstance(Object instance)
Copyright © 2018. All rights reserved.