🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

RemoteInt

Abstract base class for all remote integer representations.

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

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

Properties

absoluteValue

Source set: Android
public val absoluteValue: RemoteInt

Functions

toRemoteFloat

Source set: Android
public 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.

Return

A RemoteFloatExpression representing this integer as a float.

toRemoteLong

Source set: Android
public fun toRemoteLong(): RemoteLong

Converts this RemoteInt to a RemoteLong.

Return

A RemoteLong representing this integer as a long.

toRemoteString

Source set: Android
public fun toRemoteString(
        format: android.icu.text.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 The android.icu.text.DecimalFormat used to format the integer value. Defaults to DefaultIntegerFormat.

Return

A RemoteString representing the formatted integer value.

toRemoteString

Source set: Android
public 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 The DecimalFormat to use for determining separators, grouping, and padding.

Return

A RemoteString representing the formatted integer.

isEqualTo

Source set: Android
public 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.

isNotEqualTo

Source set: Android
public 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.

isLessThan

Source set: Android
public 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

Source set: Android
public 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.

isGreaterThan

Source set: Android
public 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

Source set: Android
public 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.

Members

Companion

Source set: Android
public companion object

Functions

invoke

Source set: Android
public operator fun invoke(value: Int): RemoteInt

createNamedRemoteInt

Source set: Android
public 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 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).

Return

A RemoteInt representing the named int.

Content updated: