Package org.openstreetmap.josm.actions
Class ActionParameter<T>
java.lang.Object
org.openstreetmap.josm.actions.ActionParameter<T>
- Type Parameters:
T- the value type
- Direct Known Subclasses:
ActionParameter.StringActionParameter,SearchAction.SearchSettingsActionParameter
Abstract class for key=value parameters, used in
ParameterizedAction.
The key (name) is a string and the value of class T. The value can be
converted to and from a string.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSimple ActionParameter implementation for string values. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedActionParameter(String name) Constructs a new ActionParameter. -
Method Summary
Modifier and TypeMethodDescriptiongetName()Get the name of this action parameter.getType()Get the value type of this action parameter.abstract TCreate a value from the given string representation (deserialization).abstract StringwriteToString(T value) Convert a given value into a string (serialization).
-
Field Details
-
name
-
-
Constructor Details
-
ActionParameter
Constructs a new ActionParameter.- Parameters:
name- parameter name (the key)
-
-
Method Details
-
getName
Get the name of this action parameter. The name is used as a key, to look up values for the parameter.- Returns:
- the name of this action parameter
-
getType
Get the value type of this action parameter.- Returns:
- the value type of this action parameter
-
writeToString
Convert a given value into a string (serialization).- Parameters:
value- the value- Returns:
- a string representation of the value
-
readFromString
Create a value from the given string representation (deserialization).- Parameters:
s- the string representation of the value- Returns:
- the corresponding value object
-