diff options
author | isXander <xandersmith2008@gmail.com> | 2023-08-12 14:41:48 +0100 |
---|---|---|
committer | isXander <xandersmith2008@gmail.com> | 2023-08-12 14:41:48 +0100 |
commit | af472c8304c9e1864b5c2a1ab8472533fe8f5950 (patch) | |
tree | fd8d69f3e3780c6042a8145aa749d17fc34b947e /common/src/main/java/dev/isxander/yacl3/api | |
parent | b45c9417a422827b351c8a797fd158f885b3ce05 (diff) | |
download | YetAnotherConfigLib-af472c8304c9e1864b5c2a1ab8472533fe8f5950.tar.gz YetAnotherConfigLib-af472c8304c9e1864b5c2a1ab8472533fe8f5950.tar.bz2 YetAnotherConfigLib-af472c8304c9e1864b5c2a1ab8472533fe8f5950.zip |
`ListOption.Builder#initial` overload to supply initial values based on context. (close #94)
Diffstat (limited to 'common/src/main/java/dev/isxander/yacl3/api')
-rw-r--r-- | common/src/main/java/dev/isxander/yacl3/api/ListOption.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/src/main/java/dev/isxander/yacl3/api/ListOption.java b/common/src/main/java/dev/isxander/yacl3/api/ListOption.java index 0371c35..1f4adfa 100644 --- a/common/src/main/java/dev/isxander/yacl3/api/ListOption.java +++ b/common/src/main/java/dev/isxander/yacl3/api/ListOption.java @@ -76,6 +76,11 @@ public interface ListOption<T> extends OptionGroup, Option<List<T>> { /** * Sets the value that is used when creating new entries */ + Builder<T> initial(@NotNull Supplier<T> initialValue); + + /** + * Sets the value that is used when creating new entries + */ Builder<T> initial(@NotNull T initialValue); Builder<T> controller(@NotNull Function<Option<T>, ControllerBuilder<T>> controller); |