/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { String } from "../String"; import type { Object } from "../Object"; import type { Number } from "../Number"; import type { Comparable } from "../Comparable"; import type { Class } from "../Class"; /** * The {@code Double} class wraps a value of the primitive type * {@code double} in an object. An object of type * {@code Double} contains a single field whose type is * {@code double}. * *
In addition, this class provides several methods for converting a * {@code double} to a {@code String} and a * {@code String} to a {@code double}, as well as other * constants and methods useful when dealing with a * {@code double}. * @author Lee Boynton * @author Arthur van Hoff * @author Joseph D. Darcy * @since JDK1.0 */ export type Double = Number & Comparable & { /** * Returns {@code true} if this {@code Double} value is * a Not-a-Number (NaN), {@code false} otherwise. * @return {@code true} if the value represented by this object is NaN; {@code false} otherwise. */ isNaN(): boolean; /** * Returns {@code true} if this {@code Double} value is * infinitely large in magnitude, {@code false} otherwise. * @return {@code true} if the value represented by this object is positive infinity or negative infinity; {@code false} otherwise. */ isInfinite(): boolean; /** * Returns a string representation of this {@code Double} object. * The primitive {@code double} value represented by this * object is converted to a string exactly as if by the method * {@code toString} of one argument. * @return a {@code String} representation of this object. * @see java.lang.Double#toString(double) */ toString(): string; /** * Returns the value of this {@code Double} as a {@code byte} * after a narrowing primitive conversion. * @return the {@code double} value represented by this object converted to type {@code byte} * @jls 5.1.3 Narrowing Primitive Conversions * @since JDK1.1 */ byteValue(): unknown; /** * Returns the value of this {@code Double} as a {@code short} * after a narrowing primitive conversion. * @return the {@code double} value represented by this object converted to type {@code short} * @jls 5.1.3 Narrowing Primitive Conversions * @since JDK1.1 */ shortValue(): number; /** * Returns the value of this {@code Double} as an {@code int} * after a narrowing primitive conversion. * @jls 5.1.3 Narrowing Primitive Conversions * @return the {@code double} value represented by this object converted to type {@code int} */ intValue(): number; /** * Returns the value of this {@code Double} as a {@code long} * after a narrowing primitive conversion. * @return the {@code double} value represented by this object converted to type {@code long} * @jls 5.1.3 Narrowing Primitive Conversions */ longValue(): number; /** * Returns the value of this {@code Double} as a {@code float} * after a narrowing primitive conversion. * @return the {@code double} value represented by this object converted to type {@code float} * @jls 5.1.3 Narrowing Primitive Conversions * @since JDK1.0 */ floatValue(): number; /** * Returns the {@code double} value of this {@code Double} object. * @return the {@code double} value represented by this object */ doubleValue(): number; /** * Returns a hash code for this {@code Double} object. The * result is the exclusive OR of the two halves of the * {@code long} integer bit representation, exactly as * produced by the method {@link #doubleToLongBits(double)}, of * the primitive {@code double} value represented by this * {@code Double} object. That is, the hash code is the value * of the expression: * *
* {@code (int)(v^(v>>>32))} ** * where {@code v} is defined by: * *
* {@code long v = Double.doubleToLongBits(this.doubleValue());} ** @return a {@code hash code} value for this object. */ hashCode(): number; /** * Compares this object against the specified object. The result * is {@code true} if and only if the argument is not * {@code null} and is a {@code Double} object that * represents a {@code double} that has the same value as the * {@code double} represented by this object. For this * purpose, two {@code double} values are considered to be * the same if and only if the method {@link * #doubleToLongBits(double)} returns the identical * {@code long} value when applied to each. * *
Note that in most cases, for two instances of class * {@code Double}, {@code d1} and {@code d2}, the * value of {@code d1.equals(d2)} is {@code true} if and * only if * *
* {@code d1.doubleValue() == d2.doubleValue()} ** *
also has the value {@code true}. However, there are two * exceptions: *