FixedValuesBuilder
DSL builder for defining a set of allowed, immutable values for a property.
Use this builder inside a PropertyBuilder to specify which values are valid for the property. Duplicate values are automatically removed.
The builder supports the unary plus operator (+) and add function to add values to the set.
Example
val allowedLevels = FixedValuesBuilder<String>().apply {
+"DEBUG"
+"INFO"
+"WARN"
+"ERROR"
}.build()Content copied to clipboard
When used in a property DSL:
property("log-level") {
value = "INFO"
fixedValues {
+"DEBUG"
+"INFO"
+"WARN"
+"ERROR"
}
}Content copied to clipboard
Parameters
T
Type of the values in the set