New Stuff

-Fixed: Crash with FIFOQueues peek function when loops were applied.
-Fixed: FIFOQueues clean function was doing unessesary extra work.
-Added: Stream Overrides functions now support sorted.
-Updated: Changelog.
-Added: A couple more badges because why not.
This commit is contained in:
2022-04-21 17:25:23 +02:00
parent 4d3eaaf604
commit 5fa26bfbf3
9 changed files with 163 additions and 9 deletions
@@ -7,12 +7,13 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.LockSupport;
import java.util.function.Consumer;
#if !TYPE_OBJECT
import speiger.src.collections.PACKAGE.functions.CONSUMER;
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
#else
import java.util.function.BiFunction;
import java.util.Comparator;
#endif
import speiger.src.collections.PACKAGE.collections.ITERABLE;
@@ -172,6 +173,17 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
return this;
}
/**
* Sorts the elements inside of the Iterable.
* This operation is heavily hurting performance because it rebuilds the entire iterator and then sorts it, and this will affect the pausing feature.
* @param sorter that sorts the elements.
* @return self with a sorter applied
*/
public ASYNC_BUILDER KEY_GENERIC_TYPE sorted(COMPARATOR KEY_GENERIC_TYPE sorter) {
iterable = ITERABLES.sorted(iterable, sorter);
return this;
}
/**
* Allows to preview elements before they are processed
* @param action the action that should be applied