Java java.lang Float fields, constructors, methods, implement or subclass

Example usage for Java java.lang Float fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.lang Float.

The text is from its open source code.

Field

floatPOSITIVE_INFINITY
A constant holding the positive infinity of type float .
floatNEGATIVE_INFINITY
A constant holding the negative infinity of type float .
floatNaN
A constant holding a Not-a-Number (NaN) value of type float .
floatMAX_VALUE
A constant holding the largest positive finite value of type float , (2-2-23)·2127.
floatMIN_NORMAL
A constant holding the smallest positive normal value of type float , 2-126.
floatMIN_VALUE
A constant holding the smallest positive nonzero value of type float , 2-149.
intMAX_EXPONENT
Maximum exponent a finite float variable may have.
intMIN_EXPONENT
Minimum exponent a normalized float variable may have.
intSIZE
The number of bits used to represent a float value.
intBYTES
The number of bytes used to represent a float value.
ClassTYPE
The Class instance representing the primitive type float .

Constructor

Float(float value)
Constructs a newly allocated Float object that represents the primitive float argument.
Float(double value)
Constructs a newly allocated Float object that represents the argument converted to type float .
Float(String s)
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string.

Method

bytebyteValue()
Returns the value of this Float as a byte after a narrowing primitive conversion.
intcompare(float f1, float f2)
Compares the two specified float values.
intcompareTo(Float anotherFloat)
Compares two Float objects numerically.
doubledoubleValue()
Returns the value of this Float as a double after a widening primitive conversion.
booleanequals(Object obj)
Compares this object against the specified object.
intfloatToIntBits(float value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout.
intfloatToRawIntBits(float value)
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout, preserving Not-a-Number (NaN) values.
floatfloatValue()
Returns the float value of this Float object.
ClassgetClass()
Returns the runtime class of this Object .
inthashCode()
Returns a hash code for this Float object.
inthashCode(float value)
Returns a hash code for a float value; compatible with Float.hashCode() .
floatintBitsToFloat(int bits)
Returns the float value corresponding to a given bit representation.
intintValue()
Returns the value of this Float as an int after a narrowing primitive conversion.
booleanisFinite(float f)
Returns true if the argument is a finite floating-point value; returns false otherwise (for NaN and infinity arguments).
booleanisInfinite()
Returns true if this Float value is infinitely large in magnitude, false otherwise.
booleanisInfinite(float v)
Returns true if the specified number is infinitely large in magnitude, false otherwise.
booleanisNaN()
Returns true if this Float value is a Not-a-Number (NaN), false otherwise.
booleanisNaN(float v)
Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise.
longlongValue()
Returns value of this Float as a long after a narrowing primitive conversion.
floatmax(float a, float b)
Returns the greater of two float values as if by calling Math#max(float,float) Math.max .
floatparseFloat(String s)
Returns a new float initialized to the value represented by the specified String , as performed by the valueOf method of class Float .
shortshortValue()
Returns the value of this Float as a short after a narrowing primitive conversion.
StringtoHexString(float f)
Returns a hexadecimal string representation of the float argument.
StringtoString()
Returns a string representation of this Float object.
StringtoString(float f)
Returns a string representation of the float argument.
FloatvalueOf(String s)
Returns a Float object holding the float value represented by the argument string s .
FloatvalueOf(float f)
Returns a Float instance representing the specified float value.