<div class='sourceset sourceset-android'>Android</div>

```kotlin
public abstract class RemoteInt
internal constructor(
    @get:Suppress("AutoBoxing") public override val constantValueOrNull: Int?,
    internal val arrayProvider: (creationState: RemoteComposeCreationState) -> LongArray,
) : BaseRemoteState<Int>()
```

Abstract base class for all remote integer representations.

`RemoteInt` represents an integer value that can be a constant, a named variable, or a dynamic
expression (e.g., a bitwise OR).

## Functions

<h2 id="toremotefloat">toRemoteFloat</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun toRemoteFloat(): RemoteFloat
```

Converts this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) to a [RemoteFloat](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFloat). If the [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) is a literal, it\'s directly
converted to a float. Otherwise, a `RemoteFloatExpression` is created that references the
remote float ID of this integer.

#### Returns

| | |
| --- | --- |
|  | A `RemoteFloatExpression` representing this integer as a float. |

<hr class="docs-overload-divider">

<h2 id="toremotestring-before-flags">toRemoteString</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun toRemoteString(before: Int, flags: Int = TextFromFloat.PAD_PRE_SPACE): RemoteString
```

Converts this RemoteInt to a RemoteString. The conversion includes formatting options such as
the number of digits to display and padding flags.

#### Parameters

| | |
| --- | --- |
| before | The number of digits to display. |
| flags | The flags that control how the number is formatted. See `TextFromFloat`. |

<hr class="docs-overload-divider">

<h2 id="toremotestring-format">toRemoteString</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun toRemoteString(
        format: android.icu.text.DecimalFormat = DefaultIntegerFormat
    ): RemoteString
```

Converts this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) to a [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) using the specified `format`.

This method maps the localized ICU `android.icu.text.DecimalFormat` configuration (including
padding, rounding, and digit constraints) to a remote-compatible string representation. It
specifically handles complex padding logic and threshold-based selections to ensure the
formatted output remains consistent when evaluated on the remote target.

#### Parameters

| | |
| --- | --- |
| format | The `android.icu.text.DecimalFormat` used to format the integer value. Defaults to `DefaultIntegerFormat`. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the formatted integer value. |

<hr class="docs-overload-divider">

<h2 id="toremotestring-format-2">toRemoteString</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun toRemoteString(format: DecimalFormat): RemoteString
```

Converts this RemoteInt to a RemoteString.

This method maps the localized `DecimalFormat` symbols (such as separators and grouping
sizes) and configuration (such as padding and rounding) to a remote-compatible string
representation.

#### Parameters

| | |
| --- | --- |
| format | The `DecimalFormat` to use for determining separators, grouping, and padding. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteString](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteString) representing the formatted float. |

<hr class="docs-overload-divider">

<h2 id="createreference">createReference</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun createReference(): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that is a reference of this RemoteInt.

This is temporarily useful because the floatArray has a maximum size.

<hr class="docs-overload-divider">

<h2 id="plus-v">plus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun plus(v: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="minus-v">minus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun minus(v: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="times-v">times</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun times(v: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="div-v">div</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun div(v: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="rem-v">rem</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun rem(v: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="plus-v-2">plus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun plus(v: RemoteInt): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="minus-v-2">minus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun minus(v: RemoteInt): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="times-v-2">times</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun times(v: RemoteInt): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="div-v-2">div</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun div(v: RemoteInt): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="rem-v-2">rem</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun rem(v: RemoteInt): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="unaryminus">unaryMinus</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public operator fun unaryMinus(): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="inv">inv</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun inv(): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="eq-b">eq</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun eq(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is equal to the value of this
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="ne-b">ne</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun ne(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is not equal to the value of this
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="lt-b">lt</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun lt(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is less than the value of this
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="le-b">le</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun le(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is less than or equal to the value
of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="gt-b">gt</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun gt(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is greater than the value of this
[RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="ge-b">ge</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun ge(b: RemoteInt): RemoteBoolean
```

Returns a [RemoteBoolean](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteBoolean) that evaluates to `true` if `b` is greater than or equal to the
value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) or `false` otherwise.

<hr class="docs-overload-divider">

<h2 id="shl-v">shl</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun shl(v: RemoteInt): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) shifted left by the
value of `v`.

<hr class="docs-overload-divider">

<h2 id="shr-v">shr</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun shr(v: RemoteInt): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) shifted right by the
value of `v`.

<hr class="docs-overload-divider">

<h2 id="or-v">or</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun or(v: RemoteInt): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) logic or with the value
of `v`.

<hr class="docs-overload-divider">

<h2 id="and-v">and</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun and(v: RemoteInt): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) logic and with the
value of `v`.

<hr class="docs-overload-divider">

<h2 id="xor-v">xor</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public infix fun xor(v: RemoteInt): RemoteInt
```

Returns a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) that evaluates to the value of this [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) logic xor with the
value of `v`.

## Companion Object

#### Methods

<hr class="docs-overload-divider">

<h2 id="invoke-value">invoke</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
public operator fun invoke(value: Int): RemoteInt
```

<hr class="docs-overload-divider">

<h2 id="isliteral-v">isLiteral</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        public fun isLiteral(v: Long): Boolean
```

Checks if a given `Long` value is considered a literal (i.e., not an ID or an OP code).

#### Parameters

| | |
| --- | --- |
| v | The `Long` value to check. |

#### Returns

| | |
| --- | --- |
|  | `true` if the value is a literal, `false` otherwise. |

<hr class="docs-overload-divider">

<h2 id="isconstant-v">isConstant</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        public fun isConstant(v: Long): Boolean
```

Checks if a given `Long` value representing a remote integer is considered constant. This
performs a conservative check, assuming that variables are not constant unless explicitly
determined otherwise.

#### Parameters

| | |
| --- | --- |
| v | The `Long` value representing a remote integer (could be a literal or an ID). |

#### Returns

| | |
| --- | --- |
|  | `true` if the value is constant, `false` otherwise. |

<div class='sourceset sourceset-android'>Android</div>

> **Deprecated** Use createForId

<hr class="docs-overload-divider">

<h2 id="invoke-v">invoke</h2>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        
        public operator fun invoke(v: Long): RemoteInt
```

Creates a [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) instance from a `Long` value, which could be a literal or an ID.
The `hasConstantValue` is determined by calling [isConstant](#isconstant).

#### Parameters

| | |
| --- | --- |
| v | The constant `Long` value. |

#### Returns

| | |
| --- | --- |
|  | A `RemoteIntExpression` representing the constant integer. |

<hr class="docs-overload-divider">

<h2 id="createnamedremoteint-name-defaultvalue-domain">createNamedRemoteInt</h2>

<div class='sourceset sourceset-android'>Android</div>

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        @JvmStatic
        public fun createNamedRemoteInt(
            name: String,
            defaultValue: Int,
            domain: RemoteState.Domain = RemoteState.Domain.User,
        ): RemoteInt
```

Creates a named [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) with an initial value. Named remote ints can be set via
AndroidRemoteContext.setNamedInt.

#### Parameters

| | |
| --- | --- |
| name | The unique name for this remote long. |
| defaultValue | The initial `Int` value for the named remote int. |
| domain | The domain of the named integer (defaults to [RemoteState.Domain.User](/jetpack-compose/androidx.compose.remote/remote-creation-compose/objects/RemoteState.Domain.User)). |

#### Returns

| | |
| --- | --- |
|  | A [RemoteInt](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteInt) representing the named int. |