home *** CD-ROM | disk | FTP | other *** search
- package java.lang;
-
- public final class Float extends Number {
- public static final float POSITIVE_INFINITY = InfinityF;
- public static final float NEGATIVE_INFINITY = -InfinityF;
- public static final float NaN = NaNF;
- public static final float MAX_VALUE = 3.4028235E38F;
- public static final float MIN_VALUE = 1.4E-45F;
- private float value;
-
- public static native String toString(float var0);
-
- public static native Float valueOf(String var0) throws NumberFormatException;
-
- public static boolean isNaN(float v) {
- return v != v;
- }
-
- public static boolean isInfinite(float v) {
- return v == POSITIVE_INFINITY || v == NEGATIVE_INFINITY;
- }
-
- public Float(float value) {
- this.value = value;
- }
-
- public Float(double value) {
- this.value = (float)value;
- }
-
- public Float(String s) throws NumberFormatException {
- this(valueOf(s));
- }
-
- public boolean isNaN() {
- return isNaN(this.value);
- }
-
- public boolean isInfinite() {
- return isInfinite(this.value);
- }
-
- public String toString() {
- return String.valueOf(this.value);
- }
-
- public int intValue() {
- return (int)this.value;
- }
-
- public long longValue() {
- return (long)this.value;
- }
-
- public float floatValue() {
- return this.value;
- }
-
- public double doubleValue() {
- return (double)this.value;
- }
-
- public int hashCode() {
- return floatToIntBits(this.value);
- }
-
- public boolean equals(Object obj) {
- return obj != null && obj instanceof Float && floatToIntBits(((Float)obj).value) == floatToIntBits(this.value);
- }
-
- public static native int floatToIntBits(float var0);
-
- public static native float intBitsToFloat(int var0);
- }
-