public class UnitParam extends Unit
UnitParam class represents a unit of parameter type.defaultValue, value, valueList| Constructor and Description |
|---|
UnitParam(java.util.List<java.lang.String> unitList,
Parameter parameter) |
UnitParam(java.lang.String value,
java.util.List<java.lang.String> unitList,
Parameter parameter)
Initializes a newly created
UnitParam with the specified value, predefined
units and reference to the appropriate parameter. |
| Modifier and Type | Method and Description |
|---|---|
void |
changeValue(java.lang.String value)
Sets the new value of unit and marks its parameter as chosen.
|
void |
setDefault()
Sets the default value of the unit - assignes the default value to the main value and notifies its observers.
|
void |
updateValue()
Sets the new value of unit and notifies its observers.
|
assignDefaultFromValue, clone, getDefaultValue, getValue, getValueList, setDefaultValue, setValue, setValueListpublic UnitParam(java.lang.String value,
java.util.List<java.lang.String> unitList,
Parameter parameter)
UnitParam with the specified value, predefined
units and reference to the appropriate parameter. The value argument is the
value of the unit. The unitList is a list of predefined units. The
parameter argument is an appropriate parameter.value - a value of the unit.unitList - a list of predefined units.parameter - a reference to the unit parameter.public UnitParam(java.util.List<java.lang.String> unitList,
Parameter parameter)
public void updateValue()
updateValue in class Unitpublic void changeValue(java.lang.String value)
changeValue in class Unitvalue - a new value of the unit.public void setDefault()
setDefault in class Unit