KpaList

Read-only view of a list-shaped structure addressable by integer indices.

Inheritors

Properties

Link copied to clipboard

The factory that knows how to produce primitives and rebuild structs/lists in this adapter family.

Link copied to clipboard
abstract val size: Int

The number of elements in this list.

Functions

Link copied to clipboard
abstract operator fun get(index: Int): KpaElement

Returns the element at index. Throws on out-of-range indices.

Link copied to clipboard
operator fun KpaList.get(pointer: KPointer): KpaElement?

Returns the KpaElement at the path identified by pointer, or null if a segment is not a valid index.

Link copied to clipboard

Creates a new KpaList by applying pointer-based mutations within block.

Link copied to clipboard
abstract fun toList(): List<KpaElement>

Returns a snapshot of this list as a plain List.