| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Float
public final class Float
The Float class provides an object wrapper for Float data values, and serves as a place for float-oriented operations. A wrapper is useful because most of Java's utility classes require the use of objects. Since floats are not objects in Java, they need to be "wrapped" in a Float instance.
| Field Summary | |
|---|---|
| static float | MAX_VALUEThe maximum value a float can have. | 
| static float | MIN_VALUEThe minimum value a float can have. | 
| static float | NaNNot-a-Number. | 
| static float | NEGATIVE_INFINITYNegative infinity. | 
| static float | POSITIVE_INFINITYPositive infinity. | 
| Constructor Summary | |
|---|---|
| Float(double value)Constructs a Float wrapper for the specified double value. | |
| Float(float value)Constructs a Float wrapper for the specified float value. | |
| Method Summary | |
|---|---|
|  byte | byteValue()Returns the value of this Float as a byte (by casting to a byte). | 
|  double | doubleValue()Returns the double value of this Float. | 
|  boolean | equals(Object obj)Compares this object against some other object. | 
| static int | floatToIntBits(float value)Returns the bit represention of a single-float value | 
|  float | floatValue()Returns the float value of this Float object. | 
|  int | hashCode()Returns a hashcode for this Float. | 
| static float | intBitsToFloat(int bits)Returns the single-float corresponding to a given bit represention. | 
|  int | intValue()Returns the integer value of this Float (by casting to an int). | 
|  boolean | isInfinite()Returns true if this Float value is infinitely large in magnitude. | 
| static boolean | isInfinite(float v)Returns true if the specified number is infinitely large in magnitude. | 
|  boolean | isNaN()Returns true if this Float value is Not-a-Number (NaN). | 
| static boolean | isNaN(float v)Returns true if the specified number is the special Not-a-Number (NaN) value. | 
|  long | longValue()Returns the long value of this Float (by casting to a long). | 
| static float | parseFloat(String s)Returns a new float initialized to the value represented by the specified String, as performed by thevalueOfmethod of classDouble. | 
|  short | shortValue()Returns the value of this Float as a short (by casting to a short). | 
|  String | toString()Returns a String representation of this Float object. | 
| static String | toString(float f)Returns a String representation for the specified float value. | 
| static Float | valueOf(float val) | 
| static Float | valueOf(String s)Returns the floating point value represented by the specified String. | 
| Methods inherited from class java.lang.Object | 
|---|
| getClass, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final float POSITIVE_INFINITY
public static final float NEGATIVE_INFINITY
public static final float NaN
public static final float MAX_VALUE
public static final float MIN_VALUE
| Constructor Detail | 
|---|
public Float(float value)
value - the value of the Floatpublic Float(double value)
value - the value of the Float| Method Detail | 
|---|
public static String toString(float f)
f - the float to be converted
public static Float valueOf(String s)
                     throws NumberFormatException
s - the String to be parsed
NumberFormatException - If the String does not contain a parsable
 Float.public static boolean isNaN(float v)
v - the value to be testedpublic static boolean isInfinite(float v)
v - the value to be tested
public static float parseFloat(String s)
                        throws NumberFormatException
String, as performed by the valueOf
 method of class Double.
s - the string to be parsed.
NumberFormatException - if the string does not contain a
               parsable float.Double.valueOf(String)public boolean isNaN()
public boolean isInfinite()
public String toString()
toString in class Objectpublic byte byteValue()
public short shortValue()
public int intValue()
public long longValue()
public float floatValue()
public double doubleValue()
public int hashCode()
hashCode in class ObjectObject.equals(java.lang.Object), 
Hashtablepublic boolean equals(Object obj)
equals in class Objectobj - the object to compare with
Boolean.hashCode(), 
Hashtablepublic static int floatToIntBits(float value)
public static float intBitsToFloat(int bits)
public static Float valueOf(float val)
| 
 | " 2013 FRC Java API" | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||