Interface CustomEnumParameter.Setter
- All Known Subinterfaces:
CustomEnumParameter.Builder
- Enclosing interface:
CustomEnumParameter
public static interface CustomEnumParameter.Setter
-
Method Summary
Modifier and TypeMethodDescriptionaddEnumItem(String value, String label) Adds an enumeration item.allowMultipleValues(boolean value) allowNoValue(boolean allow) Adds 'not selected' option.clear()Removes all enumeration items.singleValue(String value) Overrides values set byvalues(Iterable)orvalues(String...)methods.Sets a tooltip for an item.Overrides values set byvalues(String...)orsingleValue(String)methods.Overrides values set byvalues(Iterable)orsingleValue(String)methods.
-
Method Details
-
addEnumItem
Adds an enumeration item.- Parameters:
value- id of the option, selected value will be returned inCustomEnumParameter.values()label- that will be shown to user, if label isnull,valuewill be used as label- Returns:
- the same instance to allow method chaining.
-
tooltip
Sets a tooltip for an item.- Parameters:
value- The tooltip text to use for the item.- Returns:
- the same instance to allow method chaining.
- Since:
- 3.25.6
-
clear
Removes all enumeration items.- Returns:
- the same instance to allow method chaining.
-
allowNoValue
Adds 'not selected' option. -
allowMultipleValues
- Throws:
IllegalArgumentException- if there are more than one values already set byvalues(Iterable)orvalues(String...)and the value is false
-
values
Overrides values set byvalues(String...)orsingleValue(String)methods.- Returns:
- the same instance to allow method chaining.
- Throws:
IllegalArgumentException- if this parameter does not allow multiple values and the parameter contains more then one value
-
values
Overrides values set byvalues(Iterable)orsingleValue(String)methods.- Returns:
- the same instance to allow method chaining.
- Throws:
IllegalArgumentException- if this parameter does not allow multiple values and the parameter contains more then one value
-
singleValue
Overrides values set byvalues(Iterable)orvalues(String...)methods.- Returns:
- the same instance to allow method chaining.
-