KVSource

open class KVSource(map: Map<String, Any>, type: String, info: SourceInfo) : ValueSource

Source from a map in key-value format.

Constructors

KVSource
Link copied to clipboard
fun KVSource(map: Map<String, Any>, type: String = "", info: SourceInfo = SourceInfo())

Functions

contains
Link copied to clipboard
open operator fun contains(prefix: String): Boolean
Whether this source contains value(s) with specified prefix or not.
open operator fun contains(path: Path): Boolean
Whether this source contains value(s) in specified path or not.
disabled
Link copied to clipboard
open fun disabled(feature: Feature): Source
Returns a new source that disables the specified feature.
enabled
Link copied to clipboard
open fun enabled(feature: Feature): Source
Returns a new source that enables the specified feature.
get
Link copied to clipboard
open operator fun get(path: String): Source
Returns sub-source in specified path.
open operator fun get(path: Path): Source
Returns sub-source in specified path.
getNodeOrNull
Link copied to clipboard
open fun getNodeOrNull(path: Path, lowercased: Boolean = false, littleCamelCased: Boolean = true): TreeNode?
getOrNull
Link copied to clipboard
open fun getOrNull(path: String): Source?
Returns sub-source in specified path if this source contains value(s) in specified path, null otherwise.
open fun getOrNull(path: Path): Source?
Returns sub-source in specified path if this source contains value(s) in specified path, null otherwise.
isEnabled
Link copied to clipboard
open fun isEnabled(feature: Feature): Boolean
Check whether the specified feature is enabled or not.
littleCamelCased
Link copied to clipboard
open fun littleCamelCased(enabled: Boolean = true): Source
lowercased
Link copied to clipboard
open fun lowercased(enabled: Boolean = false): Source
normalized
Link copied to clipboard
open fun normalized(lowercased: Boolean = false, littleCamelCased: Boolean = true): Source
plus
Link copied to clipboard
open operator fun plus(facade: Source): Source
Returns a source overlapped by the specified facade source.
substituted
Link copied to clipboard
open fun substituted(root: Source = this, enabled: Boolean = true, errorWhenUndefined: Boolean = true): Source
Return a source that substitutes path variables within all strings by values.
withFallback
Link copied to clipboard
open fun withFallback(fallback: Source): Source
Returns a source backing by specified fallback source.
withPrefix
Link copied to clipboard
open fun withPrefix(prefix: String): Source
Returns source with specified additional prefix.
open fun withPrefix(prefix: Path): Source
Returns source with specified additional prefix.

Properties

description
Link copied to clipboard
open val description: String
Description of this source.
features
Link copied to clipboard
open val features: Map<Feature, Boolean>
Feature flags in this source.
info
Link copied to clipboard
override val info: SourceInfo
Information about this source.
map
Link copied to clipboard
val map: Map<String, Any>
tree
Link copied to clipboard
open override val tree: TreeNode
a tree node that represents internal structure of this source.
value
Link copied to clipboard
val value: Any

Sources

jvm source
Link copied to clipboard