diff --git a/src/builder/resources/speiger/assets/collections/templates/utils/AsyncBuilder.template b/src/builder/resources/speiger/assets/collections/templates/utils/AsyncBuilder.template index 14c89121..41209182 100644 --- a/src/builder/resources/speiger/assets/collections/templates/utils/AsyncBuilder.template +++ b/src/builder/resources/speiger/assets/collections/templates/utils/AsyncBuilder.template @@ -113,6 +113,16 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE return new ASYNC_BUILDERBRACES(ITERABLES.wrap(iterable)); } + /** + * Helper function that automatically wraps a array into a AsyncBuilder since it forces this collections Iterable. + * @param values that should be wrapped + * @Type(T) + * @return a AsyncBuilder with the values wrapped + */ + public static GENERIC_KEY_BRACES ASYNC_BUILDER KEY_GENERIC_TYPE of(KEY_TYPE...values) { + return new ASYNC_BUILDERBRACES(ARRAY_LIST.wrap(values)); + } + /** * Maps the elements to something else * @param mapper the mapping function