public class FixedConfigurationItem<T extends Serializable> extends Object implements ConfigurationItem<T>
ConfigurationItem
that allows to set/get fixed value of configuration item.
Useful for tests.Constructor and Description |
---|
FixedConfigurationItem(T value)
Constructor to create
wrapper with fixed value. |
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Gets required configuration item.
|
T |
getValue(T defaultValue)
Gets configuration item and specifies a default value in case configuration item is not found.
|
void |
setValue(T newValue)
Sets a new value for the configuration item.
|
String |
toString() |
public T getValue()
ConfigurationItem
getValue
in interface ConfigurationItem<T extends Serializable>
public T getValue(T defaultValue)
ConfigurationItem
getValue
in interface ConfigurationItem<T extends Serializable>
defaultValue
- as default value for itemdefaultValue
in case item
is not found in repositorypublic void setValue(T newValue)
ConfigurationItem
setValue
in interface ConfigurationItem<T extends Serializable>
newValue
- for configuration itemCopyright © 2018 Pivotal Software, Inc.. All rights reserved.