FloatProperty
public
abstract
class
FloatProperty
extends Property<T, Float>
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 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(Object, Float) that is faster when dealing
with fields of type float .
|
Inherited methods |
From
class
android.util.Property
abstract
Float
|
get(T object)
Returns the current value that this property represents on the given object .
|
String
|
getName()
Returns the name for this property.
|
Class<Float>
|
getType()
Returns the type for this property.
|
boolean
|
isReadOnly()
Returns true if the set(Object, Object) method does not set the value on the target
object (in which case the set() method should throw a NoSuchPropertyException exception).
|
static
<T, V>
Property<T, Float>
|
of(Class<T> hostType, Class<Float> valueType, String name)
This factory method creates and returns a Property given the class and
name parameters, where the "name" parameter represents either:
- a public
getName() method on the class which takes no arguments, plus an
optional public setName() method which takes a value of the same type
returned by getName()
- a public
isName() method on the class which takes no arguments, plus an
optional public setName() method which takes a value of the same type
returned by isName()
- a public
name field on the class
If either of the get/is method alternatives is found on the class, but an appropriate
setName() method is not found, the Property will be
readOnly .
|
void
|
set(T object, Float value)
Sets the value on object which this property represents.
|
|
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
FloatProperty
FloatProperty (String name)
Public methods
set
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
void setValue (T object,
float value)
A type-specific variant of set(Object, Float)
that is faster when dealing
with fields of type float
.
Parameters |
object |
T
|
value |
float
|