open class RemoteBoolean : BaseRemoteState

Known direct subclasses
MutableRemoteBoolean

A mutable implementation of RemoteBoolean.


A class representing a remote boolean value.

RemoteBoolean internally stores its state as a RemoteInt, typically using 1 for true and 0 for false. This allows boolean logic to be evaluated efficiently on the remote rendering engine.

Summary

Public functions

infix RemoteBoolean

Logical AND operator for RemoteBooleans.

infix RemoteBoolean

Equality operator for RemoteBooleans.

infix RemoteBoolean

Inequality operator for RemoteBooleans.

operator RemoteBoolean
not()

Logical NOT operator for RemoteBoolean.

infix RemoteBoolean

Logical OR operator for RemoteBooleans.

RemoteBoolean
select(ifTrue: RemoteBoolean, ifFalse: RemoteBoolean)

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

RemoteColor
select(ifTrue: RemoteColor, ifFalse: RemoteColor)

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

RemoteFloat
select(ifTrue: RemoteFloat, ifFalse: RemoteFloat)

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

RemoteInt
select(ifTrue: RemoteInt, ifFalse: RemoteInt)

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

RemoteString
select(ifTrue: RemoteString, ifFalse: RemoteString)

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

RemoteInt

Converts this RemoteBoolean to its underlying RemoteInt representation, which evaluates to 1 for true and 0 for false.

infix RemoteBoolean

Logical XOR operator for RemoteBooleans.

Public properties

open Boolean?

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

Inherited properties

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

The constant value held by this state.

open Boolean

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

Public functions

and

Added in 1.0.0-alpha07
infix fun and(b: RemoteBoolean): RemoteBoolean

Logical AND operator for RemoteBooleans.

Performs a bitwise AND operation on the underlying RemoteInt values of this boolean and the other RemoteBoolean. The result is a new RemoteBoolean.

Parameters
b: RemoteBoolean

The other RemoteBoolean to perform the AND operation with.

Returns
RemoteBoolean

A new RemoteBoolean representing the result of the logical AND.

eq

Added in 1.0.0-alpha07
infix fun eq(b: RemoteBoolean): RemoteBoolean

Equality operator for RemoteBooleans.

Returns a new RemoteBoolean that evaluates to true if this boolean\'s underlying RemoteInt is equal to another RemoteBoolean\'s underlying RemoteInt.

Parameters
b: RemoteBoolean

The other RemoteBoolean to compare with.

Returns
RemoteBoolean

A new RemoteBoolean representing the result of the equality comparison.

ne

Added in 1.0.0-alpha07
infix fun ne(b: RemoteBoolean): RemoteBoolean

Inequality operator for RemoteBooleans.

Returns a new RemoteBoolean that evaluates to true if this boolean\'s underlying RemoteInt is not equal to another RemoteBoolean\'s underlying RemoteInt.

Parameters
b: RemoteBoolean

The other RemoteBoolean to compare with.

Returns
RemoteBoolean

A new RemoteBoolean representing the result of the inequality comparison.

not

Added in 1.0.0-alpha07
operator fun not(): RemoteBoolean

Logical NOT operator for RemoteBoolean.

This creates a new RemoteBoolean whose value is the logical inverse of this boolean. It achieves this by performing a bitwise XOR operation with 1 on the underlying RemoteInt.

Returns
RemoteBoolean

A new RemoteBoolean representing the logical NOT of this boolean.

or

Added in 1.0.0-alpha07
infix fun or(b: RemoteBoolean): RemoteBoolean

Logical OR operator for RemoteBooleans.

Performs a bitwise OR operation on the underlying RemoteInt values of this boolean and the other RemoteBoolean. The result is a new RemoteBoolean.

Parameters
b: RemoteBoolean

The other RemoteBoolean to perform the OR operation with.

Returns
RemoteBoolean

A new RemoteBoolean representing the result of the logical OR.

select

Added in 1.0.0-alpha07
fun select(ifTrue: RemoteBoolean, ifFalse: RemoteBoolean): RemoteBoolean

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

Parameters
ifTrue: RemoteBoolean

The RemoteBoolean to be selected if this boolean is true.

ifFalse: RemoteBoolean

The RemoteBoolean to be selected if this boolean is false.

Returns
RemoteBoolean

A new RemoteBoolean representing the conditionally selected integer value.

select

Added in 1.0.0-alpha07
fun select(ifTrue: RemoteColor, ifFalse: RemoteColor): RemoteColor

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

Parameters
ifTrue: RemoteColor

The RemoteColor to be selected if this boolean is true.

ifFalse: RemoteColor

The RemoteColor to be selected if this boolean is false.

Returns
RemoteColor

A new RemoteColor representing the conditionally selected color.

select

Added in 1.0.0-alpha07
fun select(ifTrue: RemoteFloat, ifFalse: RemoteFloat): RemoteFloat

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

Parameters
ifTrue: RemoteFloat

The RemoteFloat to be selected if this boolean is true.

ifFalse: RemoteFloat

The RemoteFloat to be selected if this boolean is false.

Returns
RemoteFloat

A new RemoteFloat representing the conditionally selected float value.

select

Added in 1.0.0-alpha07
fun select(ifTrue: RemoteInt, ifFalse: RemoteInt): RemoteInt

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

Parameters
ifTrue: RemoteInt

The RemoteInt to be selected if this boolean is true.

ifFalse: RemoteInt

The RemoteInt to be selected if this boolean is false.

Returns
RemoteInt

A new RemoteInt representing the conditionally selected integer value.

select

Added in 1.0.0-alpha07
fun select(ifTrue: RemoteString, ifFalse: RemoteString): RemoteString

If this RemoteBoolean evaluates to true then the returned value evaluates to ifTrue otherwise it evaluates to ifFalse.

Parameters
ifTrue: RemoteString

The RemoteString to be selected if this boolean is true.

ifFalse: RemoteString

The RemoteString to be selected if this boolean is false.

Returns
RemoteString

A new RemoteString representing the conditionally selected string.

toRemoteInt

Added in 1.0.0-alpha07
fun toRemoteInt(): RemoteInt

Converts this RemoteBoolean to its underlying RemoteInt representation, which evaluates to 1 for true and 0 for false.

Returns
RemoteInt

The RemoteInt that holds the boolean\'s value.

xor

Added in 1.0.0-alpha07
infix fun xor(b: RemoteBoolean): RemoteBoolean

Logical XOR operator for RemoteBooleans.

Performs a bitwise XOR operation on the underlying RemoteInt values of this boolean and the other RemoteBoolean. The result is a new RemoteBoolean.

Parameters
b: RemoteBoolean

The other RemoteBoolean to perform the XOR operation with.

Returns
RemoteBoolean

A new RemoteBoolean representing the result of the logical XOR.

Public properties

constantValueOrNull

open val constantValueOrNullBoolean?

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