Added New Iterable Feature

-Added: Repeating iterable/iterator/async feature which allows to repeate collections a desired amount of times.
-Added: Tests for it.
This commit is contained in:
2022-07-16 05:00:22 +02:00
parent ca33c9eb9e
commit 03b23f0e3c
6 changed files with 160 additions and 0 deletions
@@ -173,6 +173,16 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
return this;
}
/**
* Repeats the elements inside of the Iterable
* @param repeats the amount of times the elements should be repeated
* @return self with a repeater applied
*/
public ASYNC_BUILDER KEY_GENERIC_TYPE repeat(int repeats) {
iterable = ITERABLES.repeat(iterable, repeats);
return this;
}
/**
* Limits how many elements are inside of the Iterable
* @param limit how many elements should max be iterated through