Class BasicToggleSettingSpecifier
java.lang.Object
net.solarnetwork.settings.support.BaseSettingSpecifier
net.solarnetwork.settings.support.BaseKeyedSettingSpecifier<Object>
net.solarnetwork.settings.support.BasicToggleSettingSpecifier
- All Implemented Interfaces:
KeyedSettingSpecifier<Object>,MappableSpecifier,SettingSpecifier,ToggleSettingSpecifier
public class BasicToggleSettingSpecifier
extends BaseKeyedSettingSpecifier<Object>
implements ToggleSettingSpecifier
Basic implementation of
ToggleSettingSpecifier.- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.settings.MappableSpecifier
MappableSpecifier.Mapper -
Constructor Summary
ConstructorsConstructorDescriptionBasicToggleSettingSpecifier(String key, Object defaultValue) Constructor.BasicToggleSettingSpecifier(String key, Object defaultValue, boolean trans) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the "false" value for this settingGet the "true" value for this setting.Return a setting specifier mapped to a new path, using aMappableSpecifier.Mapper.mappedWithPlaceholer(String template) Return a setting specifier mapped to a new path, using a format template.voidsetFalseValue(Object falseValue) voidsetTrueValue(Object trueValue) Methods inherited from class net.solarnetwork.settings.support.BaseKeyedSettingSpecifier
getDefaultValue, getDescriptionArguments, getKey, isTransient, mappedTo, setDefaultValue, setDescriptionArguments, setKey, setTransient, toStringMethods inherited from class net.solarnetwork.settings.support.BaseSettingSpecifier
getTitle, getType, setTitleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.solarnetwork.settings.KeyedSettingSpecifier
getDefaultValue, getDescriptionArguments, getKey, isTransientMethods inherited from interface net.solarnetwork.settings.MappableSpecifier
mappedToMethods inherited from interface net.solarnetwork.settings.SettingSpecifier
getTitle, getType
-
Constructor Details
-
BasicToggleSettingSpecifier
Constructor.- Parameters:
key- the keydefaultValue- the default value
-
BasicToggleSettingSpecifier
Constructor.- Parameters:
key- the keydefaultValue- the default valuetrans- the transient flag value
-
-
Method Details
-
getTrueValue
Description copied from interface:ToggleSettingSpecifierGet the "true" value for this setting.If this returns null then
Boolean.TRUEis assumed.- Specified by:
getTrueValuein interfaceToggleSettingSpecifier- Returns:
- the "true" value
-
getFalseValue
Description copied from interface:ToggleSettingSpecifierGet the "false" value for this settingIf this returns null then
Boolean.FALSEis assumed.- Specified by:
getFalseValuein interfaceToggleSettingSpecifier- Returns:
- the "false" value
-
mappedWithPlaceholer
Description copied from interface:MappableSpecifierReturn a setting specifier mapped to a new path, using a format template.- Specified by:
mappedWithPlaceholerin interfaceMappableSpecifier- Parameters:
template- the format template- Returns:
- the new instance
-
mappedWithMapper
Description copied from interface:MappableSpecifierReturn a setting specifier mapped to a new path, using aMappableSpecifier.Mapper.- Specified by:
mappedWithMapperin interfaceMappableSpecifier- Parameters:
mapper- the mapper- Returns:
- the new instance
-
setTrueValue
-
setFalseValue
-