From 1e9cd7f21e2b8d2a7fec80d60608f5a0fcfa4833 Mon Sep 17 00:00:00 2001 From: Leon Linhart Date: Wed, 8 Jan 2020 19:29:32 +0100 Subject: [PATCH] fix: add missing tags and cleanup JavaDoc --- .../gw2toolbelt/gw2ml/Configuration.java | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/gw2toolbelt/gw2ml/Configuration.java b/src/main/java/com/github/gw2toolbelt/gw2ml/Configuration.java index 48757a4..4625a49 100644 --- a/src/main/java/com/github/gw2toolbelt/gw2ml/Configuration.java +++ b/src/main/java/com/github/gw2toolbelt/gw2ml/Configuration.java @@ -55,6 +55,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.librarypath
*    Usage: Dynamic
+ * + * @since 0.1.0 */ public static final Configuration LIBRARY_PATH = new Configuration<>( "com.github.gw2toolbelt.gw2ml.librarypath", @@ -77,6 +79,8 @@ public final class Configuration { * Property: com.github.gw2toolbelt.gw2ml.bundledLibrary.nameMapper
*     Type: String or a {@link Function Function<String, String>} instance
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration BUNDLED_LIBRARY_NAME_MAPPER = new Configuration<>( "com.github.gw2toolbelt.gw2ml.bundledLibrary.nameMapper", @@ -99,6 +103,8 @@ public final class Configuration { * Property: com.github.gw2toolbelt.gw2ml.bundledLibrary.nameMapper
*     Type: String or a {@link Function Function<String, String>} instance
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration BUNDLED_LIBRARY_PATH_MAPPER = new Configuration<>( "com.github.gw2toolbelt.gw2ml.bundledLibrary.pathMapper", @@ -113,6 +119,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.SharedLibraryExtractDirectory
*    Usage: Dynamic
+ * + * @since 0.1.0 */ public static final Configuration SHARED_LIBRARY_EXTRACT_DIRECTORY = new Configuration<>( "com.github.gw2toolbelt.gw2ml.SharedLibraryExtractDirectory", @@ -141,6 +149,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.SharedLibraryExtractPath
*    Usage: Dynamic

+ * + * @since 0.1.0 */ public static final Configuration SHARED_LIBRARY_EXTRACT_PATH = new Configuration<>( "com.github.gw2toolbelt.gw2ml.SharedLibraryExtractPath", @@ -154,6 +164,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.libname
*    Usage: Dynamic

+ * + * @since 0.1.0 */ public static final Configuration LIBRARY_NAME = new Configuration<>( "com.github.gw2toolbelt.gw2ml.libname", @@ -168,6 +180,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.util.Debug
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration DEBUG = new Configuration<>( "com.github.gw2toolbelt.gw2ml.util.Debug", @@ -183,6 +197,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.util.DebugLoader
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration DEBUG_LOADER = new Configuration<>( "com.github.gw2toolbelt.gw2ml.util.DebugLoader", @@ -201,6 +217,8 @@ public final class Configuration { * Property: com.github.gw2toolbelt.gw2ml.util.DebugStream
*     Type: String or a {@link PrintStream} instance
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration DEBUG_STREAM = new Configuration<>( "com.github.gw2toolbelt.gw2ml.util.DebugStream", @@ -215,6 +233,8 @@ public final class Configuration { *

* Property: com.github.gw2toolbelt.gw2ml.util.NoChecks
*    Usage: Static

+ * + * @since 0.1.0 */ public static final Configuration DISABLE_CHECKS = new Configuration<>( "com.github.gw2toolbelt.gw2ml.util.NoChecks", @@ -255,6 +275,8 @@ private Configuration(String property, StateInit init, Usage usage) * Returns the property key. * * @return the property key + * + * @since 0.1.0 */ String getProperty() { return property; @@ -264,6 +286,8 @@ String getProperty() { * Sets the option value. * * @param value the value to set + * + * @since 0.1.0 */ public void set(@Nullable T value) { if (this.isFrozen) throw new IllegalStateException("Property is statically used."); @@ -271,9 +295,11 @@ public void set(@Nullable T value) { } /** - * Returns the option value. + * Returns the value of this option, or {@code null} if no value has been set. + * + * @return the value of this option, or {@code null} if no value has been set * - *

If the option value has not been set, null will be returned.

+ * @since 0.1.0 */ @Nullable public T get() { @@ -282,11 +308,13 @@ public T get() { } /** - * Returns the option value. + * Returns the value of this option, or {@code defaultValue} if no value has been set. + * + * @param defaultValue the default value * - *

If the option value has not been set, the specified default value will be returned.

+ * @return the value of this option, or {@code defaultValue} if no value has been set * - * @param defaultValue the default value + * @since 0.1.0 */ public T get(T defaultValue) { if (this.usage == Usage.STATIC) this.isFrozen = true;