public class NestedBooleanOptionValue extends OptionValue<Boolean>
OptionValue
that can be overridden by a master
option
.
getValue()
depends on the masterOption
and evaluates as follows:
masterOption
is set, this value equals to initialValue
.
masterOption
is false
, this option is false
.OptionValue.MultipleOverridesScope, OptionValue.OverrideScope, OptionValue.SingleOverrideScope
Modifier and Type | Field and Description |
---|---|
private Boolean |
initialValue |
private OptionValue<Boolean> |
masterOption |
value
Constructor and Description |
---|
NestedBooleanOptionValue(OptionValue<Boolean> masterOption,
Boolean initialValue) |
Modifier and Type | Method and Description |
---|---|
OptionValue<Boolean> |
getMasterOption() |
Boolean |
getValue()
Gets the value of this option.
|
defaultValue, getDefaultValue, getDescriptor, getName, getOverrideScope, getValues, hasDefaultValue, override, override, override, setDescriptor, setOverrideScope, setValue, toString
private final OptionValue<Boolean> masterOption
private final Boolean initialValue
public NestedBooleanOptionValue(OptionValue<Boolean> masterOption, Boolean initialValue)
public OptionValue<Boolean> getMasterOption()
public Boolean getValue()
OptionValue
getValue
in class OptionValue<Boolean>