|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.ParameterType<T>
public abstract class ParameterType<T>
This is the base class for all parameter types. A ParameterType
is used by objects that take some kind of parameter input from an user.
| Method Summary | |
|---|---|
T |
getDefaultValue()
Get the default value. |
int |
getHeight()
Get the height of the input field for the parameter in the GUI. |
List<T> |
getItems()
Get the list of item data objects to choose from. |
int |
getMultiplicity()
Get how many values that can be tied to this parameter. 0 is unlimited values and 1 is default. |
boolean |
getNotNull()
Check if the parameter can be null. |
Class<T> |
getParameterClass()
Get the class a value must have to match this parameter type. |
int |
getWidth()
Get the width of the input field in the GUI. |
boolean |
isEnumeration()
Check if the parameter type enumerates the allowed values or not. |
void |
validate(String name,
List<?> values)
Check if a list of values contain invalid values. |
void |
validate(String name,
Object value)
Check if a value is valid according to the settings of this parameter type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Class<T> getParameterClass()
public int getHeight()
public int getWidth()
public boolean getNotNull()
public int getMultiplicity()
public T getDefaultValue()
public void validate(String name,
Object value)
throws InvalidDataException
name - The name of the parameter, used for better exception messagesvalue - The value to test
InvalidDataException - If the value is invalid
public void validate(String name,
List<?> values)
throws InvalidDataException
values - A list of objects to check
InvalidDataException - If the list contains too many values as
specified by the getMultiplicity() setting or has invalid values
as checked by validate(String, Object)public boolean isEnumeration()
getItems()
public List<T> getItems()
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||