Added AsyncBuilder for arrays

This commit is contained in:
Speiger 2022-05-17 18:10:07 +02:00
parent 068cc4a4f7
commit 72943cb22c
1 changed files with 10 additions and 0 deletions

View File

@ -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