io.github.config4k.readers.ListReader.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of config4k Show documentation
Show all versions of config4k Show documentation
A Typesafe Config wrapper for Kotlin
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