class Schema
(source)
A schema for a configuration, providing default values and validation rules.
fun defaultsKeySet(): MutableSet<String>
The keys of all defaults provided by this schema. |
|
fun description(key: String): String?
Get the description for a key. |
|
fun getDefault(key: String): Any
Get a default value from this configuration. |
|
fun getDefaultBoolean(key: String): Boolean?
Get a default value from this configuration as a boolean. |
|
fun getDefaultDouble(key: String): Double?
Get a default value from this configuration as a double. |
|
fun getDefaultInteger(key: String): Int?
Get a default value from this configuration as a integer. |
|
fun getDefaultList(key: String): MutableList<Any>?
Get a default value from this configuration as a list. |
|
fun getDefaultListOfBoolean(key: String): MutableList<Boolean>?
Get a default value from this configuration as a list of booleans. |
|
fun getDefaultListOfDouble(key: String): MutableList<Double>?
Get a default value from this configuration as a list of doubles. |
|
fun getDefaultListOfInteger(key: String): MutableList<Int>?
Get a default value from this configuration as a list of integers. |
|
fun getDefaultListOfLong(key: String): MutableList<Long>?
Get a default value from this configuration as a list of longs. |
|
fun getDefaultListOfMap(key: String): MutableList<MutableMap<String, Any>>?
Get a default value from this configuration as a list of maps. |
|
fun getDefaultListOfString(key: String): MutableList<String>?
Get a default value from this configuration as a list of strings. |
|
fun getDefaultLong(key: String): Long?
Get a default value from this configuration as a long. |
|
fun getDefaultMap(key: String): MutableMap<String, Any>?
Get a default value from this configuration as a map. |
|
fun getDefaultString(key: String): String?
Get a default value from this configuration as a string. |
|
fun hasDefault(key: String): Boolean
Check if a key has a default provided by this schema. |
|
fun validate(configuration: Configuration): Stream<ConfigurationError>
Validate a configuration against this schema. The validations are done incrementally as the stream is consumed. Use |