Package net.solarnetwork.settings
Interface MappableSpecifier
- All Known Subinterfaces:
CronExpressionSettingSpecifier,GroupSettingSpecifier,KeyedSettingSpecifier<T>,MultiValueSettingSpecifier,RadioGroupSettingSpecifier,SliderSettingSpecifier,TextAreaSettingSpecifier,TextFieldSettingSpecifier,TitleSettingSpecifier,ToggleSettingSpecifier
- All Known Implementing Classes:
BaseKeyedSettingSpecifier,BasicCronExpressionSettingSpecifier,BasicGroupSettingSpecifier,BasicMultiValueSettingSpecifier,BasicRadioGroupSettingSpecifier,BasicSliderSettingSpecifier,BasicTextAreaSettingSpecifier,BasicTextFieldSettingSpecifier,BasicTitleSettingSpecifier,BasicToggleSettingSpecifier
public interface MappableSpecifier
API for a specifier that can be mapped to some other specifier.
- Version:
- 1.0
- Author:
- matt
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceAPI to dynamically map a key to a new key. -
Method Summary
Modifier and TypeMethodDescriptionReturn a setting specifier mapped to a new path.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.static List<SettingSpecifier>mapTo(List<SettingSpecifier> settings, String prefix) Map a list of settings to a new prefix.static List<SettingSpecifier>mapWithMapper(List<SettingSpecifier> settings, MappableSpecifier.Mapper mapper) Map a list of settings with aMapper.static List<SettingSpecifier>mapWithPlaceholder(List<SettingSpecifier> settings, String template) Map a list of settings with a template.
-
Method Details
-
mappedTo
Return a setting specifier mapped to a new path.This is to allow delegating setting specifiers to re-map the key.
- Parameters:
prefix- the new prefix to add to the key- Returns:
- the new instance
-
mappedWithPlaceholer
Return a setting specifier mapped to a new path, using a format template.- Parameters:
template- the format template- Returns:
- the new instance
-
mappedWithMapper
Return a setting specifier mapped to a new path, using aMappableSpecifier.Mapper.- Parameters:
mapper- the mapper- Returns:
- the new instance
-
mapTo
Map a list of settings to a new prefix.- Parameters:
settings- the settings to mapprefix- the prefix to add to each setting- Returns:
- the mapped settings
- Since:
- 1.1
-
mapWithPlaceholder
Map a list of settings with a template.- Parameters:
settings- the settings to maptemplate- the template to use- Returns:
- the mapped settings
- Since:
- 1.1
-
mapWithMapper
static List<SettingSpecifier> mapWithMapper(List<SettingSpecifier> settings, MappableSpecifier.Mapper mapper) Map a list of settings with aMapper.- Parameters:
settings- the settings to mapmapper- theMapperto use- Returns:
- the mapped settings
- Since:
- 1.1
-