Add config initialization with a map of config items

This commit is contained in:
Kai S. K. Engelbart 2020-06-11 11:24:00 +02:00
parent 51e148e2ec
commit b92a1630a1
1 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,14 @@ public class Config {
} else throw new EnvoyException("Malformed command line argument at position " + i);
}
/**
* Initializes config items from a map.
*
* @param items the items to include in this config
* @since Envoy Common v0.1-beta
*/
public void load(Map<String, ConfigItem<?>> items) { this.items.putAll(items); }
/**
* @return {@code true} if all mandatory config items are initialized
* @since Envoy Common v0.1-beta