T
- the value typepublic abstract class ActionParameter<T> extends java.lang.Object
ParameterizedAction
.
The key (name
) is a string and the value of class T
. The value can be
converted to and from a string.
Modifier and Type | Class and Description |
---|---|
static class |
ActionParameter.StringActionParameter
Simple ActionParameter implementation for string values.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
Constructor and Description |
---|
ActionParameter(java.lang.String name)
Constructs a new ActionParameter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Get the name of this action parameter.
|
abstract java.lang.Class<T> |
getType()
Get the value type of this action parameter.
|
abstract T |
readFromString(java.lang.String s)
Create a value from the given string representation (deserialization).
|
abstract java.lang.String |
writeToString(T value)
Convert a given value into a string (serialization).
|
private final java.lang.String name
public ActionParameter(java.lang.String name)
name
- parameter name (the key)public java.lang.String getName()
public abstract java.lang.Class<T> getType()
public abstract java.lang.String writeToString(T value)
value
- the valuepublic abstract T readFromString(java.lang.String s)
s
- the string representation of the value