SubspaceModifierElement

abstract class SubspaceModifierElement<N : SubspaceModifier.Node> : SubspaceModifier


An abstract class for SubspaceModifier that creates and updates SubspaceModifier.Node instances.

Parameters
<N : SubspaceModifier.Node>

The type of node that this element creates and updates.

Summary

Public constructors

Public functions

abstract N

Creates a new node of type SubspaceModifier.Node.

abstract operator Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

abstract Int

Returns a hash code value for this element.

abstract Unit
update(node: N)

Updates the given SubspaceModifier.Node with the current state of this element.

Inherited functions

From androidx.xr.compose.subspace.layout.SubspaceModifier
open Boolean

Returns true if predicate returns true for all SubspaceModifierElements in this SubspaceModifier or if this SubspaceModifier contains no Elements.

open Boolean

Returns true if predicate returns true for any SubspaceModifierElement in this SubspaceModifier.

open R
<R : Any?> foldIn(
    initial: R,
    operation: (SubspaceModifierElement<SubspaceModifier.Node>, R) -> R
)

Accumulates a value starting with initial and applying operation to the current value and each SubspaceModifierElement from outside in.

open R
<R : Any?> foldOut(
    initial: R,
    operation: (SubspaceModifierElement<SubspaceModifier.Node>, R) -> R
)

Accumulates a value starting with initial and applying operation to the current value and each SubspaceModifierElement from inside out.

open infix SubspaceModifier

Concatenates this modifier with another.

Public constructors

SubspaceModifierElement

<N : SubspaceModifier.Node> SubspaceModifierElement()
Parameters
<N : SubspaceModifier.Node>

The type of node that this element creates and updates.

Public functions

create

Added in 1.0.0-alpha01
abstract fun create(): N

Creates a new node of type SubspaceModifier.Node.

Returns
N

A new node of type SubspaceModifier.Node.

equals

Added in 1.0.0-alpha01
abstract operator fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

Parameters
other: Any?

The other object to compare to.

Returns
Boolean

true if this object is the same as the other argument; false otherwise.

hashCode

Added in 1.0.0-alpha01
abstract fun hashCode(): Int

Returns a hash code value for this element.

Returns
Int

A hash code value for this element.

update

Added in 1.0.0-alpha01
abstract fun update(node: N): Unit

Updates the given SubspaceModifier.Node with the current state of this element.

Parameters
node: N

The SubspaceModifier.Node to update.