T - type of value held by the Parameterpublic class Parameter<T>
extends java.lang.Object
implements java.lang.Cloneable
| Constructor and Description |
|---|
Parameter(T defaultValue)
Instantiates a new parameter.
|
| Modifier and Type | Method and Description |
|---|---|
protected Parameter<T> |
clone() |
T |
get()
Gets the value of this
Parameter. |
java.lang.Object |
get(int index)
Gets the value of the specified index in the array held by this
Parameter. |
T |
getDefault()
Gets the default value.
|
T |
getValue()
Gets the current value.
|
void |
merge(Parameter<?> parameter)
Merge this
Parameter with the specified one. |
void |
reset()
Resets the value to its default.
|
void |
set(T value)
Sets the value for this
Parameter. |
java.lang.String |
toString() |
public Parameter(T defaultValue)
defaultValue - the default valuepublic T getDefault()
public T getValue()
public void reset()
public T get()
Parameter. If not value was set, default value is returned.public java.lang.Object get(int index)
Parameter.index - the indexpublic void merge(Parameter<?> parameter)
Parameter with the specified one. The value will only be overridden if it is default.parameter - the parameterpublic java.lang.String toString()
toString in class java.lang.Object