All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.ggdsl.dsl.NamedData.kt Maven / Gradle / Ivy

There is a newer version: 0.4.0-dev-15
Show newest version
package org.jetbrains.kotlinx.ggdsl.dsl

import kotlinx.serialization.Serializable
import org.jetbrains.kotlinx.ggdsl.dsl.internal.toTyped
import org.jetbrains.kotlinx.ggdsl.dsl.internal.validate
import org.jetbrains.kotlinx.ggdsl.ir.data.*

/**
 * Standard [NamedDataInterface] implementation.
 */
@Serializable
public data class NamedData(override val nameToValues: Map) : NamedDataInterface {
    init {
        validate()
    }
    override fun groupBy(vararg columnPointers: ColumnPointer<*>): LazyGroupedData {
        return LazyGroupedData(columnPointers.map { it.name }, this)
    }
    public companion object {
        @PublishedApi
        internal fun fromUntyped(untypedMap: Map>): NamedData = NamedData(untypedMap.toTyped())
    }
}

/**
 * Standard [LazyGroupedDataInterface] implementation.
 */
@Serializable
public data class LazyGroupedData(
    override val keys: List,
    override val origin: NamedData
) : LazyGroupedDataInterface {
    init {
        validate()
    }
    override fun count(): CountedGroupedDataInterface {
        TODO("Not yet implemented")
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy