Class ChoiceInput<T>
java.lang.Object
com.ultikits.ultitools.ui.ChoiceInput<T>
- Type Parameters:
T- value type
- All Implemented Interfaces:
FormInput<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateChoiceInput(String key, Text label, List<ChoiceOption<T>> options, T initial) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()initial()The initial option value.key()Unique within its form;[a-z0-9_]+, at most 32 characters.label()The deferred label.static <T> ChoiceInput<T> of(String key, Text label, List<ChoiceOption<T>> options) Uses the first option initially.static <T> ChoiceInput<T> of(String key, Text label, List<ChoiceOption<T>> options, T initial) initialmust be one of the options' values.options()Options in display order; unmodifiable.toString()
-
Field Details
-
key
-
label
-
options
-
initial
-
-
Constructor Details
-
ChoiceInput
-
-
Method Details
-
of
Uses the first option initially. @throws IllegalArgumentException if empty or values repeat -
of
public static <T> ChoiceInput<T> of(String key, Text label, List<ChoiceOption<T>> options, T initial) initialmust be one of the options' values. -
key
-
label
-
options
Options in display order; unmodifiable. -
initial
The initial option value. -
equals
-
hashCode
-
toString
-