Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/util/IntProperty#pubctors) \| [Methods](https://developer.android.com/reference/android/util/IntProperty#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/util/IntProperty#inhmethods)

# IntProperty

*** ** * ** ***

` public abstract class IntProperty `   
` ` ` extends https://developer.android.com/reference/android/util/Property<T, https://developer.android.com/reference/java/lang/Integer> ` ` `

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.util.Property](https://developer.android.com/reference/android/util/Property)\<T, [java.lang.Integer](https://developer.android.com/reference/java/lang/Integer)\> ||
|   | ↳ | android.util.IntProperty\<T\> |

<br />

*** ** * ** ***

An implementation of `https://developer.android.com/reference/android/util/Property` to be used specifically with fields of type `int`. This type-specific subclass enables performance benefit by allowing calls to a `https://developer.android.com/reference/android/util/IntProperty#setValue(T,%20int)` function that takes the primitive `int` type and avoids autoboxing and other overhead associated with the `Integer` class.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/util/IntProperty#IntProperty(java.lang.String)(https://developer.android.com/reference/java/lang/String name) ` |

| ### Public methods ||
|---|---|
| ` final void` | ` https://developer.android.com/reference/android/util/IntProperty#set(T,%20java.lang.Integer)(T object, https://developer.android.com/reference/java/lang/Integer value) ` Sets the value on `object` which this property represents. |
| ` abstract void` | ` https://developer.android.com/reference/android/util/IntProperty#setValue(T,%20int)(T object, int value) ` A type-specific variant of `https://developer.android.com/reference/android/util/IntProperty#set(T,%20java.lang.Integer)` that is faster when dealing with fields of type `int`. |

### Inherited methods

From class ` https://developer.android.com/reference/android/util/Property ` ` abstract https://developer.android.com/reference/java/lang/Integer` ` https://developer.android.com/reference/android/util/Property#get(T)(T object) `

Returns the current value that this property represents on the given `object`.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/android/util/Property#getName()() `

Returns the name for this property.
` https://developer.android.com/reference/java/lang/Class<https://developer.android.com/reference/java/lang/Integer>` ` https://developer.android.com/reference/android/util/Property#getType()() `

Returns the type for this property.
` boolean` ` https://developer.android.com/reference/android/util/Property#isReadOnly()() `

Returns true if the `https://developer.android.com/reference/android/util/Property#set(T,%20V)` method does not set the value on the target object (in which case the `https://developer.android.com/reference/android/util/Property#set(T,%20V)` method should throw a `https://developer.android.com/reference/android/util/NoSuchPropertyException` exception).
` static <T, V> https://developer.android.com/reference/android/util/Property<T, https://developer.android.com/reference/java/lang/Integer>` ` https://developer.android.com/reference/android/util/Property#of(java.lang.Class<T>,%20java.lang.Class<V>,%20java.lang.String)(https://developer.android.com/reference/java/lang/Class<T> hostType, https://developer.android.com/reference/java/lang/Class<https://developer.android.com/reference/java/lang/Integer> valueType, https://developer.android.com/reference/java/lang/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 `https://developer.android.com/reference/android/util/Property#isReadOnly()`.
` void` ` https://developer.android.com/reference/android/util/Property#set(T,%20V)(T object, https://developer.android.com/reference/java/lang/Integer value) `

Sets the value on `object` which this property represents.
From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public constructors

### IntProperty

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public IntProperty (String name)
```

<br />

<br />

| Parameters ||
|---|---|
| `name` | `String` <br /> |

## Public methods

### set

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public final 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 `https://developer.android.com/reference/java/lang/UnsupportedOperationException` exception.

<br />

| Parameters ||
|---|---|
| `object` | `T` <br /> |
| `value` | `Integer` <br /> |

### setValue

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public abstract void setValue (T object, 
                int value)
```

A type-specific variant of `https://developer.android.com/reference/android/util/IntProperty#set(T,%20java.lang.Integer)` that is faster when dealing with fields of type `int`.

<br />

| Parameters ||
|---|---|
| `object` | `T` <br /> |
| `value` | `int` <br /> |