- All Known Implementing Classes:
- AndroidSettingsService,- DesktopSettingsService,- DummySettingsService,- IOSSettingsService
public interface SettingsService
The SettingService provides a simple way for storing, retrieving and removing
 key-value pairs of strings.
 
Example
 SettingsService.create().ifPresent(service -> {
      service.store("key", "value");
      String value = service.retrieve("key");
      service.remove("key");
  });
 Android Configuration: none
iOS Configuration: none
- Since:
- 3.0.0
- 
Method SummaryModifier and TypeMethodDescriptionstatic Optional<SettingsService>create()Returns an instance ofSettingsService.voidRemoves the setting for the specified key.Retrieves the value of the setting that is identified by the specified key.voidStores the setting with the specified key and value.
- 
Method Details- 
createReturns an instance ofSettingsService.- Returns:
- An instance of SettingsService.
 
- 
storeStores the setting with the specified key and value. If a setting with the specified key exists, the value for that setting will be overwritten with the specified value.- Parameters:
- key- a key that uniquely identifies the setting
- value- the value associated with the key
 
- 
removeRemoves the setting for the specified key.- Parameters:
- key- the key of the setting that needs to be removed
 
- 
retrieveRetrieves the value of the setting that is identified by the specified key.- Parameters:
- key- the key of the setting to look up
- Returns:
- the value associated with the setting or nullwhen no setting was stored with the specified key
 
 
-