src/share/classes/java/lang/Double.java

Print this page




 612      * infinitely large in magnitude, {@code false} otherwise.
 613      *
 614      * @return  {@code true} if the value represented by this object is
 615      *          positive infinity or negative infinity;
 616      *          {@code false} otherwise.
 617      */
 618     public boolean isInfinite() {
 619         return isInfinite(value);
 620     }
 621 
 622     /**
 623      * Returns a string representation of this {@code Double} object.
 624      * The primitive {@code double} value represented by this
 625      * object is converted to a string exactly as if by the method
 626      * {@code toString} of one argument.
 627      *
 628      * @return  a {@code String} representation of this object.
 629      * @see java.lang.Double#toString(double)
 630      */
 631     public String toString() {
 632         return String.valueOf(value);
 633     }
 634 
 635     /**
 636      * Returns the value of this {@code Double} as a {@code byte} (by
 637      * casting to a {@code byte}).
 638      *
 639      * @return  the {@code double} value represented by this object
 640      *          converted to type {@code byte}
 641      * @since JDK1.1
 642      */
 643     public byte byteValue() {
 644         return (byte)value;
 645     }
 646 
 647     /**
 648      * Returns the value of this {@code Double} as a
 649      * {@code short} (by casting to a {@code short}).
 650      *
 651      * @return  the {@code double} value represented by this object
 652      *          converted to type {@code short}




 612      * infinitely large in magnitude, {@code false} otherwise.
 613      *
 614      * @return  {@code true} if the value represented by this object is
 615      *          positive infinity or negative infinity;
 616      *          {@code false} otherwise.
 617      */
 618     public boolean isInfinite() {
 619         return isInfinite(value);
 620     }
 621 
 622     /**
 623      * Returns a string representation of this {@code Double} object.
 624      * The primitive {@code double} value represented by this
 625      * object is converted to a string exactly as if by the method
 626      * {@code toString} of one argument.
 627      *
 628      * @return  a {@code String} representation of this object.
 629      * @see java.lang.Double#toString(double)
 630      */
 631     public String toString() {
 632         return toString(value);
 633     }
 634 
 635     /**
 636      * Returns the value of this {@code Double} as a {@code byte} (by
 637      * casting to a {@code byte}).
 638      *
 639      * @return  the {@code double} value represented by this object
 640      *          converted to type {@code byte}
 641      * @since JDK1.1
 642      */
 643     public byte byteValue() {
 644         return (byte)value;
 645     }
 646 
 647     /**
 648      * Returns the value of this {@code Double} as a
 649      * {@code short} (by casting to a {@code short}).
 650      *
 651      * @return  the {@code double} value represented by this object
 652      *          converted to type {@code short}