DCT Lightfoot v3 API specification

java.lang
Class Float

java.lang.Object
  |
  +--java.lang.Float

public class Float
extends Object


Field Summary
static float MAX_VALUE
           
static float MIN_VALUE
           
static float NaN
           
static float NEGATIVE_INFINITY
           
static float POSITIVE_INFINITY
           
 
Constructor Summary
Float(double value)
          Declare constructors
Float(float value)
           
 
Method Summary
 byte byteValue()
          Get the value of this Float as a byte
 double doubleValue()
          Get the value of this Float as a double
 boolean equals(Object obj)
          Test if the value of this object equals another objects value
static int floatToIntBits(float value)
          Returns the bit representation of a float
 float floatValue()
          Returns the float value of this Float
 int hashCode()
          Returns the hash value for this Float
static float intBitsToFloat(int bits)
          Returns the bit representation of a float
 int intValue()
          Returns the integer value of this Float (by casting to an int)
 boolean isInfinite()
          Returns true if this Float is infinitely large in magnitude
static boolean isInfinite(float v)
          Returns true if the Float passed in is infinitely large in magnitude
 boolean isNaN()
          Returns true if this Float value is NaN (Not A Number)
static boolean isNaN(float v)
          Returns true if the float value passed in is NaN (Not A Number)
 long longValue()
          Returns the long value of this Float by casting to a long
static float parseFloat(java.lang.String s)
          Returns a new float initialized with the value represented by the specified String
 short shortValue()
          Returns the value of this Float as a short (by casting to a short)
 java.lang.String toString()
          Returns a String representation of this Float object
static java.lang.String toString(float f)
          Returns a String representation for the specified float value.
static Float valueOf(java.lang.String s)
          Returns the floating point value represented by the String
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_VALUE

public static final float MAX_VALUE
See Also:
Constant Field Values

MIN_VALUE

public static final float MIN_VALUE
See Also:
Constant Field Values

NaN

public static final float NaN
See Also:
Constant Field Values

NEGATIVE_INFINITY

public static final float NEGATIVE_INFINITY
See Also:
Constant Field Values

POSITIVE_INFINITY

public static final float POSITIVE_INFINITY
See Also:
Constant Field Values
Constructor Detail

Float

public Float(double value)
Declare constructors


Float

public Float(float value)
Method Detail

byteValue

public byte byteValue()
Get the value of this Float as a byte

Returns:
the byte value

doubleValue

public double doubleValue()
Get the value of this Float as a double

Returns:
the double value

equals

public boolean equals(Object obj)
Test if the value of this object equals another objects value

Overrides:
equals in class Object
Parameters:
obj - The other object
Returns:
true if the object is a valid Float containing the same value as this

floatToIntBits

public static int floatToIntBits(float value)
Returns the bit representation of a float

Parameters:
value - the float value
Returns:
the bit representation of the float value

floatValue

public float floatValue()
Returns the float value of this Float

Returns:
value the float value

hashCode

public int hashCode()
Returns the hash value for this Float

Overrides:
hashCode in class Object
Returns:
the hash value

intBitsToFloat

public static float intBitsToFloat(int bits)
Returns the bit representation of a float

Returns:
the bit representation of the float value

intValue

public int intValue()
Returns the integer value of this Float (by casting to an int)

Returns:
int value

isInfinite

public boolean isInfinite()
Returns true if this Float is infinitely large in magnitude

Returns:
true if the value is equal to positive or negative infinity

isInfinite

public static boolean isInfinite(float v)
Returns true if the Float passed in is infinitely large in magnitude

Parameters:
v - float to be tested
Returns:
true if the value passed in is equal to positive or negative infinity

isNaN

public boolean isNaN()
Returns true if this Float value is NaN (Not A Number)

Returns:
true if this Float value is NaN

isNaN

public static boolean isNaN(float v)
Returns true if the float value passed in is NaN (Not A Number)

Parameters:
v - the float to be tested
Returns:
true if the value passed in is NaN

longValue

public long longValue()
Returns the long value of this Float by casting to a long

Returns:
the long value equivalent of this float

parseFloat

public static float parseFloat(java.lang.String s)
                        throws NumberFormatException
Returns a new float initialized with the value represented by the specified String

Parameters:
s - the string to be parsed
Returns:
the float value represented by the string argument
NumberFormatException

shortValue

public short shortValue()
Returns the value of this Float as a short (by casting to a short)

Returns:
the value of this Float as a short

toString

public java.lang.String toString()
Returns a String representation of this Float object

Overrides:
toString in class Object
Returns:
the String representation of this object

toString

public static java.lang.String toString(float f)
Returns a String representation for the specified float value.

Parameters:
f - the float to be converted
Returns:
the String representation of the argument

valueOf

public static Float valueOf(java.lang.String s)
                     throws NumberFormatException
Returns the floating point value represented by the String

Parameters:
s - the String to be parsed
Returns:
Float initialised with the value of the String
NumberFormatException

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification