From eb880f5593322fea6bed361703548b6362c6d147 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Thu, 11 Jun 2020 11:24:00 +0200 Subject: [PATCH] Add config initialization with a map of config items --- src/main/java/envoy/data/Config.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/envoy/data/Config.java b/src/main/java/envoy/data/Config.java index c281d0e..bcff68c 100644 --- a/src/main/java/envoy/data/Config.java +++ b/src/main/java/envoy/data/Config.java @@ -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> items) { this.items.putAll(items); } + /** * @return {@code true} if all mandatory config items are initialized * @since Envoy Common v0.1-beta