public open class RemoteLong
internal constructor(
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public val low: RemoteInt,
@get:RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) public val high: RemoteInt,
) : BaseRemoteState<Long>()
Abstract base class for all remote long representations. This class extends [RemoteState
Functions
plus
public operator fun plus(v: RemoteLong): RemoteLong
Returns a new RemoteLong that evaluates to this RemoteLong plus v.
minus
public operator fun minus(v: RemoteLong): RemoteLong
Returns a new RemoteLong that evaluates to this RemoteLong minus v.
times
public operator fun times(v: RemoteLong): RemoteLong
Returns a new RemoteLong that evaluates to this RemoteLong times v.
toRemoteInt
public fun toRemoteInt(): RemoteInt
Returns a RemoteInt that evaluates to the truncating conversion of the lower 32 bits of the RemoteLong.
Companion Object
Methods
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public operator fun invoke(value: Long): RemoteLong
Creates a RemoteLong instance from a constant Long value. This value will be added as a constant to the remote document.
Parameters
| value | The constant Long value. |
Returns
| A MutableRemoteLong representing the constant value. |
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
@JvmStatic
public fun fromLowHigh(low: RemoteInt, high: RemoteInt): RemoteLong
Creates a RemoteLong from low and high RemoteInts.
Parameters
| low | The lower 32 bits. |
| high | The upper 32 bits. |
Returns
| A RemoteLong representing the combination of low and high. |
@JvmStatic
public fun createNamedRemoteLong(
name: String,
defaultValue: Long,
domain: RemoteState.Domain = RemoteState.Domain.User,
): RemoteLong
Creates a named RemoteLong with an initial value. Named remote longs can be set via AndroidRemoteContext.setNamedLong.
Parameters
| name | The unique name for this remote long. |
| defaultValue | The initial Long value for the named remote long. |
| domain | The domain of the named long (defaults to RemoteState.Domain.User). |
Returns
| A RemoteLong representing the named long. |