From e184077f9d06350ccdff79a666b34524b84f6d29 Mon Sep 17 00:00:00 2001 From: Stuart Boston Date: Fri, 7 Jul 2017 11:49:08 +0100 Subject: [PATCH] Add more javadoc --- .../omertron/themoviedbapi/tools/HttpTools.java | 10 +++++----- .../omertron/themoviedbapi/tools/MethodBase.java | 6 +++--- .../omertron/themoviedbapi/tools/MethodSub.java | 6 +++--- .../com/omertron/themoviedbapi/tools/Param.java | 6 +++--- .../omertron/themoviedbapi/tools/PostBody.java | 2 +- .../omertron/themoviedbapi/tools/PostTools.java | 6 +++--- .../themoviedbapi/tools/TmdbParameters.java | 16 ++++++++-------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java b/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java index bbc73e92c..514340f34 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/HttpTools.java @@ -61,7 +61,7 @@ public class HttpTools { * * @param url URL to use in the request * @return String content - * @throws MovieDbException + * @throws MovieDbException exception */ public String getRequest(final URL url) throws MovieDbException { try { @@ -89,7 +89,7 @@ public class HttpTools { /** * Sleep for a period of time * - * @param multiplier + * @param multiplier number of seconds to use for delay */ private void delay(long multiplier) { try { @@ -105,7 +105,7 @@ public class HttpTools { * * @param url URL to use in the request * @return String content - * @throws MovieDbException + * @throws MovieDbException exception */ public String deleteRequest(final URL url) throws MovieDbException { try { @@ -122,7 +122,7 @@ public class HttpTools { * @param url URL to use in the request * @param jsonBody Body to use in the request * @return String content - * @throws MovieDbException + * @throws MovieDbException exception */ public String postRequest(final URL url, final String jsonBody) throws MovieDbException { try { @@ -144,7 +144,7 @@ public class HttpTools { * @param response DigestedResponse to process * @param url URL for notification purposes * @return String content - * @throws MovieDbException + * @throws MovieDbException exception */ private String validateResponse(final DigestedResponse response, final URL url) throws MovieDbException { if (response.getStatusCode() == 0) { diff --git a/src/main/java/com/omertron/themoviedbapi/tools/MethodBase.java b/src/main/java/com/omertron/themoviedbapi/tools/MethodBase.java index 4d4c35ed7..646dac699 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/MethodBase.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/MethodBase.java @@ -57,7 +57,7 @@ public enum MethodBase { /** * Get the URL parameter to use * - * @return + * @return value */ public String getValue() { return this.value; @@ -66,8 +66,8 @@ public enum MethodBase { /** * Convert a string into an Enum type * - * @param value - * @return + * @param value the string representation of the enum + * @return matching enum */ public static MethodBase fromString(String value) { if (StringUtils.isNotBlank(value)) { diff --git a/src/main/java/com/omertron/themoviedbapi/tools/MethodSub.java b/src/main/java/com/omertron/themoviedbapi/tools/MethodSub.java index f79a39e58..d351df360 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/MethodSub.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/MethodSub.java @@ -91,7 +91,7 @@ public enum MethodSub { /** * Get the URL parameter to use * - * @return + * @return value */ public String getValue() { return this.value; @@ -100,8 +100,8 @@ public enum MethodSub { /** * Convert a string into an Enum type * - * @param value - * @return + * @param value the string representation of the enum + * @return matching enum */ public static MethodSub fromString(String value) { if (StringUtils.isNotBlank(value)) { diff --git a/src/main/java/com/omertron/themoviedbapi/tools/Param.java b/src/main/java/com/omertron/themoviedbapi/tools/Param.java index d2e64195d..fe59b0d54 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/Param.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/Param.java @@ -91,7 +91,7 @@ public enum Param { /** * Get the URL parameter to use * - * @return + * @return value */ public String getValue() { return this.value; @@ -100,8 +100,8 @@ public enum Param { /** * Convert a string into an Enum type * - * @param value - * @return + * @param value the string representation of the enum + * @return matching enum */ public static Param fromString(String value) { if (StringUtils.isNotBlank(value)) { diff --git a/src/main/java/com/omertron/themoviedbapi/tools/PostBody.java b/src/main/java/com/omertron/themoviedbapi/tools/PostBody.java index 0727d1064..af688f85c 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/PostBody.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/PostBody.java @@ -43,7 +43,7 @@ public enum PostBody { /** * Get the URL parameter to use * - * @return + * @return value */ public String getValue() { return this.value; diff --git a/src/main/java/com/omertron/themoviedbapi/tools/PostTools.java b/src/main/java/com/omertron/themoviedbapi/tools/PostTools.java index ca2d777a6..cf913320f 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/PostTools.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/PostTools.java @@ -61,9 +61,9 @@ public class PostTools { /** * Use Jackson to convert Map to JSON string. * - * @param map - * @return - * @throws MovieDbException + * @param map Map to convert to json + * @return json string + * @throws MovieDbException exception */ private String convertToJson(Map map) throws MovieDbException { try { diff --git a/src/main/java/com/omertron/themoviedbapi/tools/TmdbParameters.java b/src/main/java/com/omertron/themoviedbapi/tools/TmdbParameters.java index 2cd88eb78..bd8a92a54 100644 --- a/src/main/java/com/omertron/themoviedbapi/tools/TmdbParameters.java +++ b/src/main/java/com/omertron/themoviedbapi/tools/TmdbParameters.java @@ -45,7 +45,7 @@ public class TmdbParameters { /** * Get the entry set of the parameters * - * @return + * @return map of parameters */ public Set> getEntries() { return parameters.entrySet(); @@ -115,7 +115,7 @@ public class TmdbParameters { * Check to see if the collection has a certain parameter * * @param key The Parameter to check - * @return + * @return true if parameter exists */ public boolean has(final Param key) { return parameters.containsKey(key); @@ -125,7 +125,7 @@ public class TmdbParameters { * Get a parameter from the collection * * @param key The parameter to get - * @return + * @return the parameter */ public Object get(final Param key) { return parameters.get(key); @@ -134,7 +134,7 @@ public class TmdbParameters { /** * Remove a parameter from the collection * - * @param key + * @param key parameter to remove */ public void remove(final Param key) { parameters.remove(key); @@ -143,7 +143,7 @@ public class TmdbParameters { /** * Check to see if the collection has no items * - * @return + * @return true if the parameters are empty */ public boolean isEmpty() { return parameters.isEmpty(); @@ -152,7 +152,7 @@ public class TmdbParameters { /** * Check to see if the collection has items * - * @return + * @return true if there are parameters */ public boolean isNotEmpty() { return !isEmpty(); @@ -161,8 +161,8 @@ public class TmdbParameters { /** * Append any optional parameters to the URL * - * @param appendToResponse - * @return + * @param appendToResponse String array to convert to a comma list + * @return comma separated list */ public String toList(final String[] appendToResponse) { StringBuilder sb = new StringBuilder();