public class ItemParameterType<T extends BasicItem> extends ParameterType<T>
BasicData
.
It will have a list of BasicItem
derived objects of the same type
to choose from.Constructor and Description |
---|
ItemParameterType(Class<T> clazz,
List<T> items)
Create a new item parameter type, allowing null values.
|
ItemParameterType(Class<T> clazz,
T defaultValue,
boolean notNull,
int multiplicity,
List<T> items) |
Modifier and Type | Method and Description |
---|---|
(package private) ItemParameterValueData |
newParameterValueData()
Create a new
ItemParameterValueData object. |
String |
toString() |
(package private) void |
validateValue(String name,
T value)
Check if the value is in the list of allowed values.
|
getDefaultValue, getEnumeration, getHeight, getItems, getMultiplicity, getNotNull, getParameterClass, getValueType, getWidth, isEnumeration, validate, validate
public ItemParameterType(Class<T> clazz, List<T> items)
clazz
- The class object of the type of items that are accepteditems
- List of items to choose from.void validateValue(String name, T value) throws InvalidDataException
validateValue
in class ParameterType<T extends BasicItem>
name
- The name of the parameter, use the name if there is need to
throw an exceptionvalue
- The valueInvalidDataException
- If the value is not validItemParameterValueData newParameterValueData()
ItemParameterValueData
object.newParameterValueData
in class ParameterType<T extends BasicItem>