From 316936a1f85c91abf8ec5f64e1b8812de665740c Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Wed, 30 Oct 2019 17:01:55 +0100 Subject: [PATCH] Fixed Javadoc formatting and spelling --- src/main/java/envoy/client/Config.java | 37 +++++++++--------- src/main/java/envoy/client/LocalDB.java | 51 +++++++++++++------------ 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/main/java/envoy/client/Config.java b/src/main/java/envoy/client/Config.java index d6bf106..1d107ca 100644 --- a/src/main/java/envoy/client/Config.java +++ b/src/main/java/envoy/client/Config.java @@ -52,58 +52,57 @@ public class Config { case "--localDB": case "-db": localDB = new File(args[++i]); - break; } } - /** - * @return {@code true} if server, port andd localDB directory are known. + /** + * @return {@code true} if server, port and localDB directory are known. * @since Envoy v0.1-alpha */ public boolean isInitialized() { return server != null && !server.isEmpty() && port > 0 && port < 65566 && localDB != null; } /** - * @return the URL of our website + * @return the host name of the Envoy server * @since Envoy v0.1-alpha */ public String getServer() { return server; } /** - * Changes the default URL. - * Exclusively meant for developing reasons. (localhost) + * Changes the default server host name. + * Exclusively intended for development purposes. * - * @param server the URL where wish to host Envoy + * @param server the host name of the Envoy server * @since Envoy v0.1-alpha */ public void setServer(String server) { this.server = server; } /** - * @return the port at which Envoy is located in the Server + * @return the port at which the Envoy server is located on the host * @since Envoy v0.1-alpha */ public int getPort() { return port; } /** * Changes the default port. - * Exclusively meant for developing reasons. (localhost) + * Exclusively intended for development purposes. * - * @param port the port where we wish to connect to {@code Envoy}. + * @param port the port where an Envoy server is located * @since Envoy v0.1-alpha */ public void setPort(int port) { this.port = port; } /** - *@return the current local database that is held for that user - *@since Envoy v0.1-alpha - **/ + * @return the local database specific to the client user + * @since Envoy v0.1-alpha + **/ public File getLocalDB() { return localDB; } /** - *Changes the default local database. - *Exclusively meant for developing reasons. - * - *@param the local database object to set - *@since Envoy v0.1-alpha - **/ + * Changes the default local database. + * Exclusively intended for development purposes. + * + * @param the file containing the local database + * @since Envoy v0.1-alpha + **/ public void setLocalDB(File localDB) { this.localDB = localDB; } } diff --git a/src/main/java/envoy/client/LocalDB.java b/src/main/java/envoy/client/LocalDB.java index d6a257a..d7b3409 100644 --- a/src/main/java/envoy/client/LocalDB.java +++ b/src/main/java/envoy/client/LocalDB.java @@ -27,21 +27,21 @@ public class LocalDB { private List chats = new ArrayList<>(); /** - *Constructs an empty local database. - * - *@param sender the user who logs in - *@since Envoy v0.1-alpha - **/ + * Constructs an empty local database. + * + * @param sender the user that is logged in with this client + * @since Envoy v0.1-alpha + **/ public LocalDB(User sender) { this.sender = sender; } /** - *Initialises the local database and fills it with values - *if the user already sent/ received a message.
- * - *@param localDBDir the directory where we wish to save/load the database from. - *@throws EnvoyException if the directory selected is not an actual directory. - *@since Envoy v0.1-alpha - **/ + * Initializes the local database and fills it with values + * if the user has already sent or received messages. + * + * @param localDBDir the directory where we wish to save/load the database from. + * @throws EnvoyException if the directory selected is not an actual directory. + * @since Envoy v0.1-alpha + **/ public void initializeDBFile(File localDBDir) throws EnvoyException { if (localDBDir.exists() && !localDBDir.isDirectory()) throw new EnvoyException(String.format("LocalDBDir '%s' is not a directory!", localDBDir.getAbsolutePath())); @@ -50,11 +50,11 @@ public class LocalDB { } /** - *Saves the database into a file for future use. - * - *@throws IOException if something went wrong during saving - *@since Envoy v0.1-alpha - **/ + * Saves the database into a file for future use. + * + * @throws IOException if something went wrong during saving + * @since Envoy v0.1-alpha + **/ public void saveToLocalDB() { try { localDB.getParentFile().mkdirs(); @@ -72,11 +72,11 @@ public class LocalDB { } /** - *Loads all chats saved by Envoy for the user.
- * - *@throws EnvoyException if something fails while loading. - *@since Envoy v0.1-alpha - **/ + * Loads all chats saved by Envoy for the client user. + * + * @throws EnvoyException if something fails while loading. + * @since Envoy v0.1-alpha + **/ @SuppressWarnings("unchecked") private void loadFromLocalDB() throws EnvoyException { try (ObjectInputStream in = new ObjectInputStream(new FileInputStream(localDB))) { @@ -88,8 +88,9 @@ public class LocalDB { } /** - *@return all chats that the user has saved - *@since Envoy v0.1-alpha - **/ + * @return all saves {@link Chat} objects that list the client user as the + * sender + * @since Envoy v0.1-alpha + **/ public List getChats() { return chats; } }