RoboJDETM v2.0

java.lang
Class Float

java.lang.Object
  extended by java.lang.Float

public class Float
extends Object

Class to represent a float as an immutable object.


Field Summary
static float MAX_VALUE
          Maximum non-inifinity value.
static float MIN_VALUE
          Smallest positive value.
static float NaN
          Not a number value.
static float NEGATIVE_INFINITY
          Negative infinity.
static float POSITIVE_INFINITY
          Positive infinity.
 
Constructor Summary
Float(float f)
          Constructs a Float object.
 
Method Summary
static int floatToRawIntBits(float value)
          Returns an int containing the bits that represent the specified float.
static float intBitsToFloat(int bits)
          Returns the float represented by the bit in the specified int.
static boolean isInfinite(float f)
          Checks if the float value specified is infinite.
 boolean isNaN()
          Checks if this Float is Not-a-Number (NaN).
static boolean isNaN(float f)
          Checks if the float value specified is Not-a-Number (NaN).
 String toString()
          Returns a String representation of this Float.
static String toString(float f)
          Returns a String representation of the specified float.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait
 

Field Detail

MAX_VALUE

public static final float MAX_VALUE
Maximum non-inifinity value.


MIN_VALUE

public static final float MIN_VALUE
Smallest positive value.


NaN

public static final float NaN
Not a number value.


NEGATIVE_INFINITY

public static final float NEGATIVE_INFINITY
Negative infinity.


POSITIVE_INFINITY

public static final float POSITIVE_INFINITY
Positive infinity.

Constructor Detail

Float

public Float(float f)
Constructs a Float object.

Parameters:
f - float value
Method Detail

floatToRawIntBits

public static int floatToRawIntBits(float value)
Returns an int containing the bits that represent the specified float.

Parameters:
value - float value
Returns:
int containing bit represtation of the float value

intBitsToFloat

public static float intBitsToFloat(int bits)
Returns the float represented by the bit in the specified int.

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

isInfinite

public static boolean isInfinite(float f)
Checks if the float value specified is infinite.

Parameters:
f - float to check
Returns:
true if infinite, otherwise false

isNaN

public boolean isNaN()
Checks if this Float is Not-a-Number (NaN).

Returns:
true if NaN, otherwise false

isNaN

public static boolean isNaN(float f)
Checks if the float value specified is Not-a-Number (NaN).

Parameters:
f - float to check
Returns:
true if NaN, otherwise false

toString

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

Overrides:
toString in class Object
Returns:
String representation of the value

toString

public static String toString(float f)
Returns a String representation of the specified float.

Parameters:
f - float value
Returns:
String representation of the value

RoboJDETM v2.0

Copyright (c) 2003-2009 RidgeSoft, LLC. All rights reserved.
www.ridgesoft.com