add javadocs

This commit is contained in:
Simon Willnauer 2015-12-10 18:02:51 +01:00
parent 86a18a08fb
commit 9e37322377
1 changed files with 4 additions and 2 deletions

View File

@ -120,12 +120,14 @@ public abstract class AbstractScopedSettings extends AbstractComponent {
* <p>
* Note: Only settings registered in {@link SettingsModule} can be changed dynamically.
* </p>
* @param validator an additional validator that is only applied to updates of this setting.
* This is useful to add additional validation to settings at runtime compared to at startup time.
*/
public synchronized <T> void addSettingsUpdateConsumer(Setting<T> setting, Consumer<T> consumer, Consumer<T> predicate) {
public synchronized <T> void addSettingsUpdateConsumer(Setting<T> setting, Consumer<T> consumer, Consumer<T> validator) {
if (setting != get(setting.getKey())) {
throw new IllegalArgumentException("Setting is not registered for key [" + setting.getKey() + "]");
}
this.settingUpdaters.add(setting.newUpdater(consumer, logger, predicate));
this.settingUpdaters.add(setting.newUpdater(consumer, logger, validator));
}
/**