Class BasicSliderSettingSpecifier
java.lang.Object
net.solarnetwork.settings.support.BaseSettingSpecifier
net.solarnetwork.settings.support.BaseKeyedSettingSpecifier<Double>
net.solarnetwork.settings.support.BasicSliderSettingSpecifier
- All Implemented Interfaces:
KeyedSettingSpecifier<Double>,MappableSpecifier,SettingSpecifier,SliderSettingSpecifier
public class BasicSliderSettingSpecifier
extends BaseKeyedSettingSpecifier<Double>
implements SliderSettingSpecifier
Basic implementation of
SliderSettingSpecifier.- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.solarnetwork.settings.MappableSpecifier
MappableSpecifier.Mapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe maximum value allowed.The minimum value allowed.getStep()Get a step value for acceptable values between the minimum and maximum.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.voidsetMaximumValue(Double maximumValue) Set the maximum value.voidsetMinimumValue(Double minimumValue) Set the minimum value.voidSet the increment step.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
-
BasicSliderSettingSpecifier
public BasicSliderSettingSpecifier(String key, Double defaultValue, Double minValue, Double maxValue, Double step) Construct with values.- Parameters:
key- the keydefaultValue- the default valueminValue- the minimum valuemaxValue- the maximum valuestep- the step value
-
-
Method Details
-
getMinimumValue
Description copied from interface:SliderSettingSpecifierThe minimum value allowed.If null then 0 is assumed.
- Specified by:
getMinimumValuein interfaceSliderSettingSpecifier- Returns:
- the minimum value
-
getMaximumValue
Description copied from interface:SliderSettingSpecifierThe maximum value allowed.If null then 1 is assumed.
- Specified by:
getMaximumValuein interfaceSliderSettingSpecifier- Returns:
- the maximum value
-
getStep
Description copied from interface:SliderSettingSpecifierGet a step value for acceptable values between the minimum and maximum.If null then 1 is assumed.
- Specified by:
getStepin interfaceSliderSettingSpecifier- Returns:
- the step 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
-
setMinimumValue
Set the minimum value.- Parameters:
minimumValue- the minimum value to set
-
setMaximumValue
Set the maximum value.- Parameters:
maximumValue- the maximum value to set
-
setStep
Set the increment step.- Parameters:
step- the step to set
-