Float Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Float
class wraps a value of primitive type
float
in an object.
[Android.Runtime.Register("java/lang/Float", DoNotGenerateAcw=true)]
public sealed class Float : Java.Lang.Number, IConvertible, IDisposable, Java.Interop.IJavaPeerable, Java.Lang.IComparable
[<Android.Runtime.Register("java/lang/Float", DoNotGenerateAcw=true)>]
type Float = class
inherit Number
interface IConvertible
interface IComparable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Inheritance
- Attributes
- Implements
Remarks
The Float
class wraps a value of primitive type float
in an object. An object of type Float
contains a single field whose type is float
.
In addition, this class provides several methods for converting a float
to a String
and a String
to a float
, as well as other constants and methods useful when dealing with a float
.
<!-- Android-removed: paragraph on ValueBased
This is a value-based class; programmers should treat instances that are #equals(Object) equal as interchangeable and should not use instances for synchronization, or unpredictable behavior may occur. For example, in a future release, synchronization may fail. -->
<h2>equivalenceRelation>Floating-point Equality, Equivalence, and Comparison</h2>
The class java.lang.Double
has a discussion of equality, equivalence, and comparison of floating-point values that is equality applicable to float
values.
Added in 1.0.
Java documentation for java.lang.Float
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Constructors
Float(Double) |
Constructs a newly allocated |
Float(Single) |
Constructs a newly allocated |
Float(String) |
Constructs a newly allocated |
Fields
Bytes |
The number of bytes used to represent a |
MaxExponent |
Maximum exponent a finite |
MinExponent |
Minimum exponent a normalized |
MinNormal |
A constant holding the smallest positive normal value of type
|
Size |
The number of bits used to represent a |
Properties
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
IsInfinite |
Returns |
IsNaN |
Returns |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Number) |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from Number) |
Type |
The |
Methods
ByteValue() |
Returns the value of the specified number as a |
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Compare(Single, Single) |
Compares the two specified |
CompareTo(Float) |
Compares two |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
DoubleValue() |
Returns the value of this |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
FloatToIntBits(Single) |
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout. |
FloatToRawIntBits(Single) |
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. |
FloatValue() |
Returns the |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
HashCode(Single) |
Returns a hash code for a |
IntBitsToFloat(Int32) |
Returns the |
IntValue() |
Returns the value of this |
InvokeIsInfinite(Single) |
Returns |
InvokeIsNaN(Single) |
Returns |
IsFinite(Single) |
Returns |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
LongValue() |
Returns value of this |
Max(Single, Single) |
Returns the greater of two |
Min(Single, Single) |
Returns the smaller of two |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
ParseFloat(String) |
Returns a new |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ShortValue() |
Returns the value of the specified number as a |
Sum(Single, Single) |
Adds two |
ToArray<T>() | (Inherited from Object) |
ToHexString(Single) |
Returns a hexadecimal string representation of the
|
ToString() |
Returns a string representation of the object. (Inherited from Object) |
ToString(Single) |
Returns a string representation of the |
UnregisterFromRuntime() | (Inherited from Object) |
ValueOf(Single) |
Returns a |
ValueOf(String) |
Returns a |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Operators
Explicit(Float to Single) |
Explicit Interface Implementations
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |