www.pudn.com > j2me_cldc-1_1-fcs-src-winunix.rar > Float.java, change:2003-02-05,size:22833b


/*
 * Copyright © 2003 Sun Microsystems, Inc. All rights reserved.
 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 */

package java.lang;

/**
 * The Float class wraps a value of primitive type float in
 * an object. An object of type Float contains a single
 * field whose type is float.
 * 

* In addition, this class provides several methods for converting a * float to a String and a * String to a float, as well as other * constants and methods useful when dealing with a * float. * * @author Lee Boynton * @author Arthur van Hoff * @version 12/17/01 (CLDC 1.1) * @since JDK1.0, CLDC 1.1 */ public final class Float { /** * The positive infinity of type float. It is equal * to the value returned by * Float.intBitsToFloat(0x7f800000). */ public static final float POSITIVE_INFINITY = 1.0f / 0.0f; /** * The negative infinity of type float. It is equal * to the value returned by * Float.intBitsToFloat(0xff800000). */ public static final float NEGATIVE_INFINITY = -1.0f / 0.0f; /** * The Not-a-Number (NaN) value of type float. * It is equal to the value returned by * Float.intBitsToFloat(0x7fc00000). */ public static final float NaN = 0.0f / 0.0f; /** * The largest positive value of type float. It is * equal to the value returned by * Float.intBitsToFloat(0x7f7fffff). */ public static final float MAX_VALUE = 3.40282346638528860e+38f; /** * The smallest positive value of type float. It * is equal to the value returned by * Float.intBitsToFloat(0x1). */ public static final float MIN_VALUE = 1.40129846432481707e-45f; /** * Returns a String representation for the specified float value. * The argument is converted to a readable string format as follows. * All characters and characters in strings mentioned below are ASCII * characters. *