MutableMeta

interface MutableMeta : Meta, MutableMetaProvider

Mutable variant of Meta TODO documentation

Functions

equals
Link copied to clipboard
common
abstract operator override fun equals(other: Any?): Boolean
getMeta
Link copied to clipboard
common
open override fun getMeta(name: Name): MutableMeta?
getOrCreate
Link copied to clipboard
common
abstract fun getOrCreate(name: Name): MutableMeta

Get existing node or create a new one

getValue
Link copied to clipboard
common
open override fun getValue(name: Name): Value?
hashCode
Link copied to clipboard
common
abstract override fun hashCode(): Int
put
Link copied to clipboard
common
open infix fun String.put(boolean: Boolean)
open infix fun String.put(array: DoubleArray)
open infix fun String.put(enum: Enum<*>)
open infix fun String.put(builder: MutableMeta.() -> Unit)
open infix fun String.put(number: Number)
open infix fun String.put(string: String)
open infix fun String.put(meta: Meta)
open infix fun String.put(repr: MetaRepr)
open infix fun String.put(value: Value?)
open infix fun Name.put(boolean: Boolean)
open infix fun Name.put(enum: Enum<*>)
open infix fun Name.put(mutableMeta: MutableMeta.() -> Unit)
open infix fun Name.put(number: Number)
open infix fun Name.put(string: String)
open infix fun Name.put(meta: Meta)
open infix fun Name.put(repr: MetaRepr)
open infix fun Name.put(value: Value?)
putIndexed
Link copied to clipboard
common
open infix fun String.putIndexed(iterable: Iterable<Meta>)
open infix fun Name.putIndexed(iterable: Iterable<Meta>)
setMeta
Link copied to clipboard
common
abstract fun setMeta(name: Name, node: Meta?)
setValue
Link copied to clipboard
common
open override fun setValue(name: Name, value: Value?)
toMeta
Link copied to clipboard
common
open override fun toMeta(): Meta
toString
Link copied to clipboard
common
abstract override fun toString(): String

Properties

items
Link copied to clipboard
common
abstract override val items: Map<NameToken, MutableMeta>
value
Link copied to clipboard
common
abstract override var value: Value?

Get or set value of this node

Inheritors

MutableTypedMeta
Link copied to clipboard
ObservableMutableMeta
Link copied to clipboard

Extensions

append
Link copied to clipboard
common
fun MutableMeta.append(name: Name, meta: Meta)

Append the node with a same-name-sibling, automatically generating numerical index

fun MutableMeta.append(key: String, meta: Meta)
fun MutableMeta.append(name: Name, value: Value)
fun MutableMeta.append(key: String, value: Value)
asObservable
Link copied to clipboard
common
fun MutableMeta.asObservable(): ObservableMutableMeta

Cast this MutableMeta to ObservableMutableMeta or create an observable wrapper. Only changes made to the result are guaranteed to be observed.

getOrCreate
Link copied to clipboard
common
fun MutableMeta.getOrCreate(key: String): MutableMeta
listOfSpec
Link copied to clipboard
common
fun <T : Scheme> MutableMeta.listOfSpec(spec: Specification<T>, key: Name? = null): ReadWriteProperty<Any?, List<T>>

A delegate that uses a Specification to wrap a list of child providers. If children are mutable, the changes in list elements are reflected on them. The list is a snapshot of children state, so change in structure is not reflected on its composition.

set
Link copied to clipboard
common
operator fun MutableMeta.set(name: Name, meta: Meta)

Set or replace node at given name

operator fun MutableMeta.set(name: Name, value: Value?)

Set or replace value at given name

operator fun MutableMeta.set(name: NameToken, value: Value?)
operator fun MutableMeta.set(key: String, value: Value?)
operator fun MutableMeta.set(name: Name, value: String)
operator fun MutableMeta.set(name: NameToken, value: String)
operator fun MutableMeta.set(key: String, value: String)
operator fun MutableMeta.set(name: Name, value: Boolean)
operator fun MutableMeta.set(name: NameToken, value: Boolean)
operator fun MutableMeta.set(key: String, value: Boolean)
operator fun MutableMeta.set(name: Name, value: Number)
operator fun MutableMeta.set(name: NameToken, value: Number)
operator fun MutableMeta.set(key: String, value: Number)
operator fun MutableMeta.set(name: Name, value: List<Value>)
operator fun MutableMeta.set(name: NameToken, value: List<Value>)
operator fun MutableMeta.set(key: String, value: List<Value>)
operator fun MutableMeta.set(name: Name, metas: Iterable<Meta>)
operator fun MutableMeta.set(key: String, metas: Iterable<Meta>)
setIndexed
Link copied to clipboard
common
fun MutableMeta.setIndexed(name: Name, metas: Iterable<Meta>, indexFactory: (Meta, index: Int) -> String = { _, index -> index.toString() })
spec
Link copied to clipboard
common
fun <T : Scheme> MutableMeta.spec(spec: Specification<T>, key: Name? = null): ReadWriteProperty<Any?, T>

A delegate that uses a Specification to wrap a child of this provider

update
Link copied to clipboard
common
fun MutableMeta.update(meta: Meta)

Update existing mutable node with another node. The rules are following:

updateWith
Link copied to clipboard
common
fun <T : Any> MutableMeta.updateWith(spec: Specification<T>, action: T.() -> Unit): T

Update a MutableMeta using given specification

withDefault
Link copied to clipboard
common
fun MutableMeta.withDefault(default: Meta?): MutableMeta

Create a mutable item provider that uses given provider for default values if those are not found in this provider. Changes are propagated only to this provider.