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

tech.codingzen.kata.konfig.system_properties.SystemPropertiesSource.kt Maven / Gradle / Ivy

package tech.codingzen.kata.konfig.system_properties

import tech.codingzen.kata.konfig.retriever.KataKonfRetriever

@JvmInline
value class SystemPropertiesSource(val source: Map): KataKonfRetriever {
  companion object {
    @Suppress("UNCHECKED_CAST")
    val system: SystemPropertiesSource = SystemPropertiesSource(System.getProperties().toMap() as Map)
  }

  operator fun get(key: String) = source[key]
  operator fun contains(key: String) = key in source
  override fun retrieve(name: String): String? = get(name)
  override fun list(name: String): List? = null
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy