src/share/classes/java/lang/Float.java

Print this page




 534      * infinitely large in magnitude, {@code false} otherwise.
 535      *
 536      * @return  {@code true} if the value represented by this object is
 537      *          positive infinity or negative infinity;
 538      *          {@code false} otherwise.
 539      */
 540     public boolean isInfinite() {
 541         return isInfinite(value);
 542     }
 543 
 544     /**
 545      * Returns a string representation of this {@code Float} object.
 546      * The primitive {@code float} value represented by this object
 547      * is converted to a {@code String} exactly as if by the method
 548      * {@code toString} of one argument.
 549      *
 550      * @return  a {@code String} representation of this object.
 551      * @see java.lang.Float#toString(float)
 552      */
 553     public String toString() {
 554         return String.valueOf(value);
 555     }
 556 
 557     /**
 558      * Returns the value of this {@code Float} as a {@code byte} (by
 559      * casting to a {@code byte}).
 560      *
 561      * @return  the {@code float} value represented by this object
 562      *          converted to type {@code byte}
 563      */
 564     public byte byteValue() {
 565         return (byte)value;
 566     }
 567 
 568     /**
 569      * Returns the value of this {@code Float} as a {@code short} (by
 570      * casting to a {@code short}).
 571      *
 572      * @return  the {@code float} value represented by this object
 573      *          converted to type {@code short}
 574      * @since JDK1.1




 534      * infinitely large in magnitude, {@code false} otherwise.
 535      *
 536      * @return  {@code true} if the value represented by this object is
 537      *          positive infinity or negative infinity;
 538      *          {@code false} otherwise.
 539      */
 540     public boolean isInfinite() {
 541         return isInfinite(value);
 542     }
 543 
 544     /**
 545      * Returns a string representation of this {@code Float} object.
 546      * The primitive {@code float} value represented by this object
 547      * is converted to a {@code String} exactly as if by the method
 548      * {@code toString} of one argument.
 549      *
 550      * @return  a {@code String} representation of this object.
 551      * @see java.lang.Float#toString(float)
 552      */
 553     public String toString() {
 554         return Float.toString(value);
 555     }
 556 
 557     /**
 558      * Returns the value of this {@code Float} as a {@code byte} (by
 559      * casting to a {@code byte}).
 560      *
 561      * @return  the {@code float} value represented by this object
 562      *          converted to type {@code byte}
 563      */
 564     public byte byteValue() {
 565         return (byte)value;
 566     }
 567 
 568     /**
 569      * Returns the value of this {@code Float} as a {@code short} (by
 570      * casting to a {@code short}).
 571      *
 572      * @return  the {@code float} value represented by this object
 573      *          converted to type {@code short}
 574      * @since JDK1.1