public interface Settings
| Modifier and Type | Method and Description |
|---|---|
<T> void |
addChoiceSetting(String key,
ChoiceSetting<T> setting)
Adds an
ChoiceSetting to the settings container. |
void |
addFileSetting(String key,
FileSetting setting)
Adds an
FileSetting to the settings container. |
<T> void |
addMultiselectSetting(String key,
MultiselectSetting<T> setting)
Adds an
MultiselectSetting to the settings container. |
<T extends Number> |
addRangeSetting(String key,
RangeSetting<T> setting)
Adds an
RangeSetting to the settings container. |
<T> void |
addUnboundedSetting(String key,
UnboundedSetting<T> setting)
Adds an
UnboundedSetting to the settings container. |
<T> ChoiceSetting<T> |
getChoiceSetting(String key)
Returns the
ChoiceSetting with the specified key. |
FileSetting |
getFileSetting(String key)
Returns the
FileSetting with the specified key. |
<T> MultiselectSetting<T> |
getMultiselectSetting(String key)
Returns the
MultiselectSetting with the specified key. |
<T extends Number> |
getRangeSetting(String key)
Returns the
RangeSetting with the specified key. |
<T> Setting<T> |
getSetting(String key)
Returns the value associated with the specified key.
|
Map<String,SettingType> |
getSettingTypes()
This function allows you to get all setting types by key.
|
<T> UnboundedSetting<T> |
getUnboundedSetting(String key)
Returns the
UnboundedSetting with the specified key. |
void |
load()
Loads all settings from the persistence layer and updates the provided default values.
|
void |
save()
Saves all settings stored in this container to the persistence layer.
|
<T> Setting<T> getSetting(String key)
T - the type of value you want tokey - the name of the setting you want to query<T> UnboundedSetting<T> getUnboundedSetting(String key)
UnboundedSetting with the specified key.T - The value type you want to fetchkey - the name of the setting you want to query<T> void addUnboundedSetting(String key, UnboundedSetting<T> setting)
UnboundedSetting to the settings container.T - the type of value the setting should containkey - the key to store the value tosetting - the UnboundedSetting you want to store<T> ChoiceSetting<T> getChoiceSetting(String key)
ChoiceSetting with the specified key.T - The value type you want to fetchkey - the name of the setting you want to query<T> void addChoiceSetting(String key, ChoiceSetting<T> setting)
ChoiceSetting to the settings container.T - the type of value the setting should containkey - the key to store the value tosetting - the ChoiceSetting you want to store<T extends Number> RangeSetting<T> getRangeSetting(String key)
RangeSetting with the specified key.T - The value type you want to fetchkey - the name of the setting you want to query<T extends Number> void addRangeSetting(String key, RangeSetting<T> setting)
RangeSetting to the settings container.T - the type of value the setting should containkey - the key to store the value tosetting - the RangeSetting you want to storeFileSetting getFileSetting(String key)
FileSetting with the specified key.key - the name of the setting you want to queryFileSetting with the specified keyvoid addFileSetting(String key, FileSetting setting)
FileSetting to the settings container.key - the key to store the value tosetting - the FileSetting you want to store<T> MultiselectSetting<T> getMultiselectSetting(String key)
MultiselectSetting with the specified key.T - The value type you want to fetchkey - the name of the setting you want to query<T> void addMultiselectSetting(String key, MultiselectSetting<T> setting)
MultiselectSetting to the settings container.T - the type of value the setting should containkey - the key to store the value tosetting - the MultiselectSetting you want to storeMap<String,SettingType> getSettingTypes()
void save()
void load()
Copyright © 2017. All rights reserved.