Skip to content

Most visited

Recently visited

navigation
Added in API level 24

IntProperty

public abstract class IntProperty
extends Property<T, Integer>

java.lang.Object
   ↳ android.util.Property<T, java.lang.Integer>
     ↳ android.util.IntProperty<T>


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

Summary

Public constructors

IntProperty(String name)

Public methods

final void set(T object, Integer value)

Sets the value on object which this property represents.

abstract void setValue(T object, int value)

A type-specific variant of set(Object, Integer) that is faster when dealing with fields of type int.

Inherited methods

From class android.util.Property
From class java.lang.Object

Public constructors

IntProperty

Added in API level 24
IntProperty (String name)

Parameters
name String

Public methods

set

Added in API level 24
void set (T object, 
                Integer 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 Integer

setValue

Added in API level 24
void setValue (T object, 
                int value)

A type-specific variant of set(Object, Integer) that is faster when dealing with fields of type int.

Parameters
object T
value int
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.