# IntProperty

Artifact: [androidx.core:core-animation](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/animation/IntProperty.java+class:androidx.core.animation.IntProperty) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***


```
public abstract class IntProperty<T> extends Property<T, Integer>
```

<br />

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

*** ** * ** ***

An implementation of `https://developer.android.com/reference/android/util/Property.html` 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/androidx/core/animation/IntProperty#setValue(T,int)` function that takes the primitive `int` type and avoids autoboxing and other overhead associated with the `Integer` class.

| Parameters |
|---|---|
| `<T>` | The class on which the Property is declared. |

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/animation/IntProperty#IntProperty()()` A constructor that creates an int property instance with an empty name. |
| `https://developer.android.com/reference/androidx/core/animation/IntProperty#IntProperty(java.lang.String)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name)` A constructor that takes an identifying name for the int property. |

| ### Public methods |
|---|---|
| `final void` | `https://developer.android.com/reference/androidx/core/animation/IntProperty#set(T,java.lang.Integer)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T object, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/Integer.html value)` |
| `abstract void` | `https://developer.android.com/reference/androidx/core/animation/IntProperty#setValue(T,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html T object, int value)` A type-specific variant of `https://developer.android.com/reference/androidx/core/animation/IntProperty#set(T,java.lang.Integer)` that is faster when dealing with fields of type `int`. |

### Inherited methods

From [android.util.Property](https://developer.android.com/reference/android/util/Property.html) `abstract V` `https://developer.android.com/reference/android/util/Property.html#get(T)(T p)` `https://developer.android.com/reference/java/lang/String.html` `https://developer.android.com/reference/android/util/Property.html#getName()()` `https://developer.android.com/reference/java/lang/Class.html<V>` `https://developer.android.com/reference/android/util/Property.html#getType()()` `boolean` `https://developer.android.com/reference/android/util/Property.html#isReadOnly()()` `static https://developer.android.com/reference/android/util/Property.html<T, V>` `<T, V> https://developer.android.com/reference/android/util/Property.html#of(java.lang.Class&lt;T&gt;, java.lang.Class&lt;V&gt;, java.lang.String)(https://developer.android.com/reference/java/lang/Class.html<T> hostType, https://developer.android.com/reference/java/lang/Class.html<V> valueType, https://developer.android.com/reference/java/lang/String.html name)`

## Public constructors

### IntProperty

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
public IntProperty()
```

A constructor that creates an int property instance with an empty name. To create a named int property, see `https://developer.android.com/reference/androidx/core/animation/IntProperty#IntProperty(java.lang.String)`

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/animation/IntProperty#IntProperty(java.lang.String)` |   |

### IntProperty

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
public IntProperty(@NonNull String name)
```

A constructor that takes an identifying name for the int property. This name will show up as a part of `https://developer.android.com/reference/androidx/core/animation/ObjectAnimator#getPropertyName()` when the `https://developer.android.com/reference/androidx/core/animation/ObjectAnimator` is created with a `https://developer.android.com/reference/android/util/Property.html` object as its animation property. This name will also appear in systrace as a part of the animator name.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html name` | name to be used to identify the property |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/animation/IntProperty#IntProperty()` |   |

## Public methods

### set

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

```
public final void set(@NonNull T object, @NonNull Integer value)
```

### setValue

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

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

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