X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FOptions.java;h=7dea2c728fd6634f6a9fa10e2c6c253e0066c95b;hb=2e6ed35cd9d29585eefc56d94214abf2d1886fda;hp=513138bb1b5db81b4bba9ecf0d984e386c2b9ba8;hpb=0d594aad6af55ff8c551de9ece4f19bcbe699790;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/Options.java b/src/main/java/net/pterodactylus/sone/core/Options.java index 513138b..7dea2c7 100644 --- a/src/main/java/net/pterodactylus/sone/core/Options.java +++ b/src/main/java/net/pterodactylus/sone/core/Options.java @@ -1,5 +1,5 @@ /* - * Sone - Options.java - Copyright © 2010 David Roden + * Sone - Options.java - Copyright © 2010–2012 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -69,8 +69,8 @@ public class Options { * @param value * The value to validate * @return {@code true} if this option does not have a {@link Validator} - * , or the {@link Validator} validates this object, {@code - * false} otherwise + * , or the {@link Validator} validates this object, + * {@code false} otherwise */ public boolean validate(T value); @@ -329,6 +329,8 @@ public class Options { /** * Adds an {@link Enum} {@link Option}. * + * @param + * The enum type * @param name * The name of the option * @param enumOption @@ -350,11 +352,14 @@ public class Options { * options.<SomeEnum> getEnumOption("SomeEnumOption").get(); * * + * @param + * The enum type * @param name * The name of the option * @return The enum option, or {@code null} if there is no enum option with * the given name */ + @SuppressWarnings("unchecked") public > Option getEnumOption(String name) { return (Option) enumOptions.get(name); }