YamlListAdapter

class YamlListAdapter(val backing: YamlList) : AbstractKpaList<YamlElement> , YamlElementAdapter, RebuildableKpaList(source)

Adapter exposing a YamlList as a RebuildableKpaList.

Extends AbstractKpaList which handles index access, size, and list enumeration. Navigation is performed through the adapter machinery; backing is exposed for callers that need the raw YamlList.

Parameters

backing

The underlying YamlList.

Constructors

Link copied to clipboard
constructor(backing: YamlList)

Properties

Link copied to clipboard
open override val backing: YamlList
Link copied to clipboard
open override val factory: KpaElementFactory
Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun get(index: Int): KpaElement
Link copied to clipboard
open override fun toList(): List<KpaElement>
Link copied to clipboard
fun toYamlElement(): YamlElement

Returns the YamlList backing this adapter as a YamlElement.

Link copied to clipboard
fun KpaElement.toYamlElement(): YamlElement

Returns the YamlElement backing this adapter, or throws if this is not a YamlElementAdapter.