abstract class RemoteInt : BaseRemoteState

Known direct subclasses
MutableRemoteInt

A mutable implementation of RemoteInt.


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).

Summary

Public companion functions

RemoteInt
createNamedRemoteInt(
    name: String,
    defaultValue: Int,
    domain: RemoteState.Domain
)

Creates a named RemoteInt with an initial value.

operator RemoteInt
invoke(value: Int)

Public functions

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is equal to the value of this RemoteInt or false otherwise.

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is greater than the value of this RemoteInt or false otherwise.

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is greater than or equal to the value of this RemoteInt or false otherwise.

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is less than the value of this RemoteInt or false otherwise.

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is less than or equal to the value of this RemoteInt or false otherwise.

RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is not equal to the value of this RemoteInt or false otherwise.

RemoteFloat

Converts this RemoteInt to a RemoteFloat.

RemoteLong

Converts this RemoteInt to a RemoteLong.

RemoteString

Converts this RemoteInt to a RemoteString using the specified format.

RemoteString

Converts this RemoteInt to a RemoteString using the specified format.

Public properties

open Int?

The constant value or null if there isn't one.

Inherited properties

From androidx.compose.remote.creation.compose.state.RemoteState
open Int

The constant value held by this state.

open Boolean

Whether or not this remote state evaluates to a constant value.

Public companion functions

createNamedRemoteInt

Added in 1.0.0-alpha19
fun createNamedRemoteInt(
    name: String,
    defaultValue: Int,
    domain: RemoteState.Domain = RemoteState.Domain.User
): RemoteInt

Creates a named RemoteInt with an initial value. Named remote ints can be set via AndroidRemoteContext.setNamedInt.

Parameters
name: String

The unique name for this remote long.

defaultValue: Int

The initial Int value for the named remote int.

domain: RemoteState.Domain = RemoteState.Domain.User

The domain of the named integer (defaults to RemoteState.Domain.User).

Returns
RemoteInt

A RemoteInt representing the named int.

invoke

Added in 1.0.0-alpha19
operator fun invoke(value: Int): RemoteInt

Public functions

isEqualTo

Added in 1.0.0-alpha19
fun isEqualTo(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is equal to the value of this RemoteInt or false otherwise.

isGreaterThan

Added in 1.0.0-alpha19
fun isGreaterThan(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is greater than the value of this RemoteInt or false otherwise.

isGreaterThanOrEqualTo

Added in 1.0.0-alpha19
fun isGreaterThanOrEqualTo(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is greater than or equal to the value of this RemoteInt or false otherwise.

isLessThan

Added in 1.0.0-alpha19
fun isLessThan(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is less than the value of this RemoteInt or false otherwise.

isLessThanOrEqualTo

Added in 1.0.0-alpha19
fun isLessThanOrEqualTo(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is less than or equal to the value of this RemoteInt or false otherwise.

isNotEqualTo

Added in 1.0.0-alpha19
fun isNotEqualTo(other: RemoteInt): RemoteBoolean

Returns a RemoteBoolean that evaluates to true if other is not equal to the value of this RemoteInt or false otherwise.

toRemoteFloat

Added in 1.0.0-alpha19
fun toRemoteFloat(): RemoteFloat

Converts this RemoteInt to a RemoteFloat. If the 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
RemoteFloat

A RemoteFloatExpression representing this integer as a float.

toRemoteLong

Added in 1.0.0-alpha19
fun toRemoteLong(): RemoteLong

Converts this RemoteInt to a RemoteLong.

Returns
RemoteLong

A RemoteLong representing this integer as a long.

toRemoteString

Added in 1.0.0-alpha19
fun toRemoteString(format: DecimalFormat = DefaultIntegerFormat): RemoteString

Converts this RemoteInt to a 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: DecimalFormat = DefaultIntegerFormat

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

Returns
RemoteString

A RemoteString representing the formatted integer value.

toRemoteString

Added in 1.0.0-alpha19
fun toRemoteString(format: DecimalFormat): RemoteString

Converts this RemoteInt to a RemoteString using the specified format.

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: DecimalFormat

The DecimalFormat to use for determining separators, grouping, and padding.

Returns
RemoteString

A RemoteString representing the formatted integer.

Public properties

constantValueOrNull

open val constantValueOrNullInt?

The constant value or null if there isn't one.