ValidatedChoiceList

constructor(defaultValues: List<T>, choices: List<T>, handler: EntryHandler<T>, translationProvider: BiFunction<T, String, MutableText> = BiFunction { t, _ -> t.transLit(t.toString()) }, descriptionProvider: BiFunction<T, String, Text> = BiFunction { t, _ -> t.descLit("") }, widgetType: ValidatedChoiceList.WidgetType = WidgetType.POPUP)

Deprecated

Use toChoiceSet from ValidatedChoice/List/Set when possible

Parameters

T

the choice type

defaultValues

the choices that are "active" by default. Can be empty.

choices

List defining the appropriate choices

handler

EntryHandler to provide validation tasks for individual choice elements

translationProvider

BiFunction T, String, Text - converts a choice instance T and the base translation key of this ValidatedChoice into a text Translation

descriptionProvider

BiFunction T, String, Text - converts a choice instance T and the base description key of this ValidatedChoice into a text Description

widgetType

WidgetType defines the GUI selection type. Defaults to POPUP