| 程序包 | 说明 |
|---|---|
| cn.sliew.milky.common.settings |
| 限定符和类型 | 字段和说明 |
|---|---|
static Settings |
SettingsBuilder.EMPTY_SETTINGS |
| 限定符和类型 | 字段和说明 |
|---|---|
protected Function<Settings,String> |
Setting.defaultValue |
| 限定符和类型 | 方法和说明 |
|---|---|
Settings |
SettingsBuilder.build()
|
Settings |
Settings.filter(Predicate<String> predicate)
Returns a new settings object that contains all setting of the current one
filtered by the given settings key predicate.
|
Settings |
Settings.getAsSettings(String setting)
Returns the settings mapped to the given setting name.
|
Settings |
Settings.getByPrefix(String prefix)
A settings that are filtered (and key is removed) with the specified prefix.
|
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Settings> |
Settings.getAsGroups()
Returns group settings for the given setting prefix.
|
Map<String,Settings> |
Settings.getGroups(String settingPrefix)
Returns group settings for the given setting prefix.
|
Map<String,Settings> |
Settings.getGroups(String settingPrefix,
boolean ignoreNonGrouped)
Returns group settings for the given setting prefix.
|
| 限定符和类型 | 方法和说明 |
|---|---|
default boolean |
SettingUpdater.apply(Settings current,
Settings previous)
Updates this updaters value if it has changed.
|
void |
SettingUpdater.apply(T value,
Settings current,
Settings previous)
Applies the given value to the updater.
|
SettingsBuilder |
SettingsBuilder.copy(String key,
Settings source) |
SettingsBuilder |
SettingsBuilder.copy(String key,
String sourceKey,
Settings source)
copy.
|
boolean |
Setting.exists(Settings settings)
Returns true if and only if this setting is present in the given settings instance.
|
boolean |
Setting.existsOrFallbackExists(Settings settings)
Returns true if and only if this setting including fallback settings
is present in the given settings instance.
|
T |
Setting.get(Settings settings)
Returns the settings value.
|
T |
Setting.getDefault(Settings settings)
Returns the default value for this setting.
|
String |
Setting.getDefaultRaw(Settings settings)
Returns the default value string representation for this setting.
|
String |
Setting.getRaw(Settings settings) |
T |
SettingUpdater.getValue(Settings current,
Settings previous)
Returns the instance value for the current settings.
|
boolean |
SettingUpdater.hasChanged(Settings current,
Settings previous)
Returns true if this updaters setting has changed with the current update.
|
SettingsBuilder |
SettingsBuilder.put(Settings settings)
Sets all the provided settings.
|
default Runnable |
SettingUpdater.updater(Settings current,
Settings previous)
Returns a callable runnable that calls
SettingUpdater.apply(Object, Settings, Settings) if the settings
actually changed. |
| 构造器和说明 |
|---|
GroupSetting(Key key,
Function<Settings,String> defaultValue,
Setting<Settings> fallbackSetting,
Function<String,Settings> parser,
Validator<Settings> validator) |
GroupSetting(Key key,
Function<Settings,String> defaultValue,
Setting<Settings> fallbackSetting,
Function<String,Settings> parser,
Validator<Settings> validator) |
GroupSetting(Key key,
Function<Settings,String> defaultValue,
Setting<Settings> fallbackSetting,
Function<String,Settings> parser,
Validator<Settings> validator) |
GroupSetting(Key key,
Function<Settings,String> defaultValue,
Setting<Settings> fallbackSetting,
Function<String,Settings> parser,
Validator<Settings> validator) |
Setting(Key key,
Function<Settings,String> defaultValue,
Setting<T> fallbackSetting,
Function<String,T> parser,
Validator<T> validator)
LineLength.
|
Copyright © 2021. All rights reserved.