interface Configuration
(source)
Represents collection of configuration properties, optionally validated against a schema.
open static fun canonicalKey(key: String): String
Get the canonical form of a configuration key. |
|
abstract fun contains(key: String): Boolean
Check if a key is set in this configuration. |
|
open static fun empty(): Configuration
Get an empty configuration, with no values. open static fun empty(schema: Schema?): Configuration
Get an empty configuration, associated with a validation schema. |
|
abstract fun errors(): MutableList<ConfigurationError>
The errors that occurred during parsing. |
|
open static fun fromToml(toml: String): Configuration
Read a configuration from a TOML-formatted string. open static fun fromToml(toml: String, schema: Schema?): Configuration
Read a configuration from a TOML-formatted string, associated with a validation schema. open static fun fromToml(file: Path): Configuration open static fun fromToml(is: InputStream): Configuration
Loads a configuration from a TOML-formatted file. open static fun fromToml(file: Path, schema: Schema?): Configuration open static fun fromToml(is: InputStream, schema: Schema?): Configuration
Loads a configuration from a file, associated with a validation schema. |
|
abstract fun get(key: String): Any?
Get an object from this configuration. |
|
abstract fun getBoolean(key: String): Boolean
Get a boolean from this configuration. |
|
abstract fun getDouble(key: String): Double
Get a double from this configuration. |
|
abstract fun getInteger(key: String): Int
Get an integer from this configuration. |
|
abstract fun getList(key: String): MutableList<Any>
Get a list from this configuration. |
|
abstract fun getListOfBoolean(key: String): MutableList<Boolean>
Get a list of booleans from this configuration. |
|
abstract fun getListOfDouble(key: String): MutableList<Double>
Get a list of doubles from this configuration. |
|
abstract fun getListOfInteger(key: String): MutableList<Int>
Get a list of integers from this configuration. |
|
abstract fun getListOfLong(key: String): MutableList<Long>
Get a list of longs from this configuration. |
|
abstract fun getListOfMap(key: String): MutableList<MutableMap<String, Any>>
Get a list of maps from this configuration. |
|
abstract fun getListOfString(key: String): MutableList<String>
Get a list of strings from this configuration. |
|
abstract fun getLong(key: String): Long
Get a long from this configuration. |
|
abstract fun getMap(key: String): MutableMap<String, Any>
Get a map from this configuration. |
|
abstract fun getString(key: String): String
Get a string from this configuration. |
|
open fun hasErrors(): Boolean |
|
abstract fun inputPositionOf(key: String): DocumentPosition?
Get the position where a key is defined in the TOML document. |
|
abstract fun keySet(): MutableSet<String>
The keys of all entries present in this configuration. |
|
open fun toToml(): String
Get a TOML-formatted representation of this configuration. open fun toToml(path: Path): Unit
Save a configuration to a TOML-formatted file. If necessary, parent directories for the output file will be created. abstract fun toToml(appendable: Appendable): Unit
Writes a configuration in TOML format. |