From 3321ee01b1d67c5bae2af31c7e87da52106a4553 Mon Sep 17 00:00:00 2001 From: leon Date: Sat, 12 Oct 2019 11:52:29 +0200 Subject: [PATCH] Added Javadoc to Config file. --- src/main/java/envoy/client/Config.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/envoy/client/Config.java b/src/main/java/envoy/client/Config.java index 8ee95bd..fda0f97 100644 --- a/src/main/java/envoy/client/Config.java +++ b/src/main/java/envoy/client/Config.java @@ -15,11 +15,25 @@ public class Config { private String server; private int port; + /** + * Defaults to the {@code server.properties} file for information. + * + * + * @param properties - The two options for internet connection server and port + * @since Envoy 0.1 + */ public void load(Properties properties) { if (properties.containsKey("server")) server = properties.getProperty("server"); if (properties.containsKey("port")) port = Integer.parseInt(properties.getProperty("port")); } + /** + * Sets the server and the port via command line properties --server/ -s and --port/ -p. + * + * @param args {@code --server} or {@code -s} followed by the specified URL + * and {@code --port} or {@code -p} followed by a 4-digit Integer + * @since Envoy 0.1 + */ public void load(String[] args) { for (int i = 0; i < args.length; i++) switch (args[i]) {