home *** CD-ROM | disk | FTP | other *** search
- package java.lang;
-
- public final class Float extends Number implements Comparable {
- 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;
- public static final Class TYPE = Class.getPrimitiveClass("float");
- private float value;
- private static final long serialVersionUID = -2671257302660747028L;
-
- public static String toString(float var0) {
- return (new FloatingDecimal(var0)).toJavaFormatString();
- }
-
- public static Float valueOf(String var0) throws NumberFormatException {
- return new Float(FloatingDecimal.readJavaFormatString(var0).floatValue());
- }
-
- public static float parseFloat(String var0) throws NumberFormatException {
- return FloatingDecimal.readJavaFormatString(var0).floatValue();
- }
-
- public static boolean isNaN(float var0) {
- return var0 != var0;
- }
-
- public static boolean isInfinite(float var0) {
- return var0 == POSITIVE_INFINITY || var0 == NEGATIVE_INFINITY;
- }
-
- public Float(float var1) {
- this.value = var1;
- }
-
- public Float(double var1) {
- this.value = (float)var1;
- }
-
- public Float(String var1) throws NumberFormatException {
- this(valueOf(var1));
- }
-
- public boolean isNaN() {
- return isNaN(this.value);
- }
-
- public boolean isInfinite() {
- return isInfinite(this.value);
- }
-
- public String toString() {
- return String.valueOf(this.value);
- }
-
- public byte byteValue() {
- return (byte)((int)this.value);
- }
-
- public short shortValue() {
- return (short)((int)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 var1) {
- return var1 instanceof Float && floatToIntBits(((Float)var1).value) == floatToIntBits(this.value);
- }
-
- public static native int floatToIntBits(float var0);
-
- public static native int floatToRawIntBits(float var0);
-
- public static native float intBitsToFloat(int var0);
-
- public int compareTo(Float var1) {
- float var2 = this.value;
- float var3 = var1.value;
- if (var2 < var3) {
- return -1;
- } else if (var2 > var3) {
- return 1;
- } else {
- int var4 = floatToIntBits(var2);
- int var5 = floatToIntBits(var3);
- return var4 == var5 ? 0 : (var4 < var5 ? -1 : 1);
- }
- }
-
- public int compareTo(Object var1) {
- return this.compareTo((Float)var1);
- }
- }
-