Value - public class ImmutableConfigurationUnit<Value> extends Object implements ConfigurationUnit<Value>
ImmutableConfigurationUnit is a ConfigurationUnit which
takes its Parameter and Value at the instantiation and can't
change them afterward. However, the Parameter can still change its
value and the method apply() can be called to set the
Parameter to the stored Value.| Constructor and Description |
|---|
ImmutableConfigurationUnit(Parameter<Value> parameter,
Value value)
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply()
Equivalent to
unit.getParameter().set(unit.getValue()) |
Parameter<Value> |
getParameter() |
Value |
getValue() |
boolean |
isApplied() |
public Parameter<Value> getParameter()
getParameter in interface ConfigurationUnit<Value>Parameter targeted by this ConfigurationUnitpublic Value getValue()
getValue in interface ConfigurationUnit<Value>Value targeted by this ConfigurationUnitpublic void apply()
unit.getParameter().set(unit.getValue())apply in interface ConfigurationUnit<Value>ConfigurationUnit.isApplied()public boolean isApplied()
isApplied in interface ConfigurationUnit<Value>true if the Parameter returned by
ConfigurationUnit.getParameter() is set to the Value returned by
ConfigurationUnit.getValue(), false otherwiseConfigurationUnit.apply()Copyright © 2015. All rights reserved.