public final class Double extends Number implements Comparable<Double>
double
as an object.Modifier and Type | Field and Description |
---|---|
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 |
floatRegex
Modifier and Type | Method and Description |
---|---|
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() |
boolean |
isInfinite() |
static boolean |
isInfinite(double x) |
boolean |
isNaN() |
static boolean |
isNaN(double x) |
static double |
longBitsToDouble(long bits) |
long |
longValue() |
static double |
parseDouble(String s) |
short |
shortValue() |
String |
toString() |
static String |
toString(double b) |
static Double |
valueOf(double d) |
static Double |
valueOf(String s) |
__decodeAndValidateInt, __decodeNumberString, __parseAndValidateDouble, __parseAndValidateInt, __parseAndValidateLong
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 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)
public static boolean isInfinite(double x)
public static boolean isNaN(double x)
public static double longBitsToDouble(long bits)
public static double parseDouble(String s) throws NumberFormatException
NumberFormatException
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
Copyright © 2018. All rights reserved.