org.jetbrains.kotlinx.ggdsl.dsl.internal.MutableTableData.kt Maven / Gradle / Ivy
package org.jetbrains.kotlinx.ggdsl.dsl.internal
import org.jetbrains.kotlinx.ggdsl.dsl.NamedData
import org.jetbrains.kotlinx.ggdsl.ir.data.TableData
import org.jetbrains.kotlinx.ggdsl.ir.data.TypedList
/**
* Buffer type for creating a [TableData] dynamically, i.e. with dynamic adding columns.
*
* @property map buffer [MutableMap].
* @property toTableData builds [TableData].
*/
public interface MutableTableData {
public val map: MutableMap
public fun toTableData(): TableData
}
/**
* Buffer type for creating a [NamedData] dynamically, i.e. with dynamic adding columns.
*/
public open class MutableNamedData(
public override val map: MutableMap = mutableMapOf()
): MutableTableData {
public override fun toTableData(): NamedData {
return NamedData(map.toMap())
}
}
/*
@PublishedApi
internal fun NamedData.toMutableNamedData(): MutableNamedData = MutableNamedData(map.toMutableMap())
*/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy