FloatProperty

public abstract class FloatProperty
extends Property<T, Float>

java.lang.Object
   ↳ android.util.Property<T, java.lang.Float>
     ↳ android.util.FloatProperty<T>


An implementation of Property to be used specifically with fields of type float. This type-specific subclass enables performance benefit by allowing calls to a setValue() function that takes the primitive float type and avoids autoboxing and other overhead associated with the Float class.

Summary

Public constructors

FloatProperty(String name)

Public methods

final void set(T object, Float value)

Sets the value on object which this property represents.

abstract void setValue(T object, float value)

A type-specific variant of set(java.lang.Object, java.lang.Float) that is faster when dealing with fields of type float.

Inherited methods

Public constructors

FloatProperty

Added in API level 24
public FloatProperty (String name)

Parameters
name String

Public methods

set

Added in API level 24
public final void set (T object, 
                Float value)

Sets the value on object which this property represents. If the method is unable to set the value on the target object it will throw an UnsupportedOperationException exception.

Parameters
object T

value Float

setValue

Added in API level 24
public abstract void setValue (T object, 
                float value)

A type-specific variant of set(java.lang.Object, java.lang.Float) that is faster when dealing with fields of type float.

Parameters
object T

value float