tuweni / org.apache.tuweni.config / Schema

Schema

class Schema (source)

A schema for a configuration, providing default values and validation rules.

Functions

defaultsKeySet

The keys of all defaults provided by this schema.

fun defaultsKeySet(): MutableSet<String!>!
fun defaultsKeySet(prefix: String!): MutableSet<String!>!

description

Get the description for a key.

fun description(key: String!): String?

getDefault

Get a default value from this configuration.

fun getDefault(key: String!): Any!

getDefaultBoolean

Get a default value from this configuration as a boolean.

fun getDefaultBoolean(key: String!): Boolean?

getDefaultDouble

Get a default value from this configuration as a double.

fun getDefaultDouble(key: String!): Double?

getDefaultInteger

Get a default value from this configuration as a integer.

fun getDefaultInteger(key: String!): Int?

getDefaultList

Get a default value from this configuration as a list.

fun getDefaultList(key: String!): MutableList<Any!>?

getDefaultListOfBoolean

Get a default value from this configuration as a list of booleans.

fun getDefaultListOfBoolean(key: String!): MutableList<Boolean!>?

getDefaultListOfDouble

Get a default value from this configuration as a list of doubles.

fun getDefaultListOfDouble(key: String!): MutableList<Double!>?

getDefaultListOfInteger

Get a default value from this configuration as a list of integers.

fun getDefaultListOfInteger(key: String!): MutableList<Int!>?

getDefaultListOfLong

Get a default value from this configuration as a list of longs.

fun getDefaultListOfLong(key: String!): MutableList<Long!>?

getDefaultListOfMap

Get a default value from this configuration as a list of maps.

fun getDefaultListOfMap(key: String!): MutableList<MutableMap<String!, Any!>!>?

getDefaultListOfString

Get a default value from this configuration as a list of strings.

fun getDefaultListOfString(key: String!): MutableList<String!>?

getDefaultLong

Get a default value from this configuration as a long.

fun getDefaultLong(key: String!): Long?

getDefaultMap

Get a default value from this configuration as a map.

fun getDefaultMap(key: String!): MutableMap<String!, Any!>?

getDefaultString

Get a default value from this configuration as a string.

fun getDefaultString(key: String!): String?

getSubSection

fun getSubSection(name: String!): Schema!

getSubSectionPrefix

fun getSubSectionPrefix(key: String!): String!

hasDefault

Check if a key has a default provided by this schema.

fun hasDefault(key: String!): Boolean

validate

Validate a configuration against this schema.

fun validate(configuration: Configuration!): Stream<ConfigurationError!>!