graphmine-core / io.github.sof3.graphmine.config / ConfigSpec / entry
protected fun <T : Any> entry(validator: (T) -> String? = { null }): SimpleConfigEntry<T>
Declares a required entry
T - type of entry
validator - returns an error string if the config value is incorrect, null otherwiseprotected fun <T : Any> entry(default: T, validator: (T) -> String? = { null }): SimpleConfigEntry<T>
Declares an entry with a default value
/**
* The default language to use
*/
var language by entry("en_US")
T - type of entry
default - default value to use if the config does not specify this entry.
validator - returns an error string if the config value is incorrect, null otherwise