Skip to content

Most visited

Recently visited

navigation

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.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

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.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)