java.lang
Class Float

java.lang.Object
  |
  +--java.lang.Number
        |
        +--java.lang.Float
All Implemented Interfaces:
Comparable, java.io.Serializable

public final synchronized class Float
extends Number
implements Comparable


Field Summary
static float MAX_VALUE
           
static float MIN_VALUE
           
static float NaN
           
static float NEGATIVE_INFINITY
           
static float POSITIVE_INFINITY
           
static Class TYPE
           
 
Constructor Summary
Float(double)
           
Float(float)
           
Float(String)
           
 
Method Summary
 byte byteValue()
           
static int compare(float, float)
           
 int compareTo(Float)
           
 int compareTo(Object)
           
 double doubleValue()
           
 boolean equals(Object)
          Determines if this object is "equal" to another object.
static int floatToIntBits(float)
           
static int floatToRawIntBits(float)
           
 float floatValue()
           
 int hashCode()
           
static float intBitsToFloat(int)
           
 int intValue()
           
 boolean isInfinite()
           
static boolean isInfinite(float)
           
 boolean isNaN()
           
static boolean isNaN(float)
           
 long longValue()
           
static float parseFloat(String)
           
 short shortValue()
           
 String toString()
           
static String toString(float)
           
static Float valueOf(String)
           
 

Field Detail

POSITIVE_INFINITY

public static final float POSITIVE_INFINITY

NEGATIVE_INFINITY

public static final float NEGATIVE_INFINITY

NaN

public static final float NaN

MAX_VALUE

public static final float MAX_VALUE

MIN_VALUE

public static final float MIN_VALUE

TYPE

public static final Class TYPE
Constructor Detail

Float

public Float(float)

Float

public Float(double)

Float

public Float(String)
      throws NumberFormatException
Method Detail

toString

public static String toString(float)

valueOf

public static Float valueOf(String)
                     throws NumberFormatException

parseFloat

public static float parseFloat(String)
                        throws NumberFormatException

isNaN

public static boolean isNaN(float)

isInfinite

public static boolean isInfinite(float)

isNaN

public boolean isNaN()

isInfinite

public boolean isInfinite()

toString

public String toString()
Overrides:
toString in class Object

byteValue

public byte byteValue()
Overrides:
byteValue in class Number

shortValue

public short shortValue()
Overrides:
shortValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object)
Description copied from class: Object
Determines if this object is "equal" to another object.

In general, objects should be instances of the same class with the same guts to be considered equal. For example, the code below only prints same value since s and t are different strings though they have the same value: "hello".

 String s = new String("hello");
 String t = new String("hello");
 if (s.equals(t)) System.out.println("same value");
 if (s == t) System.out.println("same string");

 

Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
is - the other Object to which this one is compared
Returns:
true if this Object is equal to other

floatToIntBits

public static int floatToIntBits(float)

floatToRawIntBits

public static int floatToRawIntBits(float)

intBitsToFloat

public static float intBitsToFloat(int)

compareTo

public int compareTo(Float)

compareTo

public int compareTo(Object)
Specified by:
compareTo in interface Comparable

compare

public static int compare(float,
                          float)