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

io.github.config4k.readers.ListReader.kt Maven / Gradle / Ivy

The newest version!
package io.github.config4k.readers

import io.github.config4k.ClassContainer

internal class ListReader(clazz: ClassContainer, mutable: Boolean = false) : Reader>({ config, path ->
    val reader = SelectReader.getReader(clazz)
    config.getList(path).map {
        val dummyName = "key"
        reader(it.atKey(dummyName), dummyName)
    }.let { if (mutable) it.toMutableList() else it }
})




© 2015 - 2025 Weber Informatics LLC | Privacy Policy