Skip to content

Commit 8f0caf4

Browse files
FxMorinItsNature
authored andcommitted
Option: Add static enum builder method
- Like the other option types
1 parent 4d7a9b9 commit 8f0caf4

File tree

1 file changed

+11
-0
lines changed
  • api/src/main/java/com/lunarclient/apollo/option

1 file changed

+11
-0
lines changed

api/src/main/java/com/lunarclient/apollo/option/Option.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,17 @@ public static <T> ListOption.ListOptionBuilder<T> list() {
7878
return new ListOption.ListOptionBuilder<>();
7979
}
8080

81+
/**
82+
* Returns a new {@link EnumOption.EnumOptionBuilder}.
83+
*
84+
* @param <T> the value type
85+
* @return a new enum option builder
86+
* @since 1.2.1
87+
*/
88+
public static <T extends Enum<T>> EnumOption.EnumOptionBuilder<T> enumerator() {
89+
return new EnumOption.EnumOptionBuilder<>();
90+
}
91+
8192
/**
8293
* Returns the option path.
8394
*

0 commit comments

Comments
 (0)