enumOption) {
+ enumOptions.put(name, enumOption);
+ return enumOption;
+ }
+
+ /**
+ * Returns a {@link Enum} {@link Option}. As the type can probably not be
+ * interred correctly you could help the compiler by calling this method
+ * like this:
+ *
+ *
+ *
+ * options.<SomeEnum> getEnumOption("SomeEnumOption").get();
+ *
+ *
+ * @param name
+ * The name of the option
+ * @return The enum option, or {@code null} if there is no enum option with
+ * the given name
+ */
+ public > Option getEnumOption(String name) {
+ return (Option) enumOptions.get(name);
+ }
+
}