corda/classpath/java/lang/Float.java

65 lines
1.2 KiB
Java

package java.lang;
public final class Float extends Number {
public static final Class TYPE = Class.forCanonicalName("F");
private final float value;
public Float(float value) {
this.value = value;
}
public static Float valueOf(float value) {
return new Float(value);
}
public boolean equals(Object o) {
return o instanceof Float && ((Float) o).value == value;
}
public int hashCode() {
return floatToRawIntBits(value);
}
public String toString() {
return toString(value);
}
public static String toString(float v) {
return "Float.toString: todo";
}
public byte byteValue() {
return (byte) value;
}
public short shortValue() {
return (short) value;
}
public int intValue() {
return (int) value;
}
public long longValue() {
return (long) value;
}
public float floatValue() {
return value;
}
public double doubleValue() {
return (double) value;
}
public static float parseFloat(String s) {
// todo
throw new NumberFormatException(s);
}
public static native int floatToRawIntBits(float value);
public static native float intBitsToFloat(int bits);
}