add javadocs

This commit is contained in:
Simon Willnauer 2015-12-10 18:05:51 +01:00
parent 9e37322377
commit 8c7e142eb0
1 changed files with 8 additions and 0 deletions

View File

@ -45,6 +45,14 @@ public class Setting<T> extends ToXContentToBytes {
private final boolean dynamic;
private final Scope scope;
/**
* Creates a new Setting instance
* @param key the settings key for this setting.
* @param defaultValue a default value function that returns the default values string representation.
* @param parser a parser that parses the string rep into a complex datatype.
* @param dynamic true iff this setting can be dynamically updateable
* @param scope the scope of this setting
*/
public Setting(String key, Function<Settings, String> defaultValue, Function<String, T> parser, boolean dynamic, Scope scope) {
assert parser.apply(defaultValue.apply(Settings.EMPTY)) != null || this.isGroupSetting(): "parser returned null";
this.key = key;