Fixed Java9 or newer issues.

This commit is contained in:
Speiger committed 2022-12-15 17:13:34 +01:00
1 parent 9df95c0fc3
commit 859d00da16
6 files changed
+172 -7

No files matched your search

@@ -146,7 +146,7 @@ public class ARRAYS
* @param action that is creating the Array to be poured into
* @return array with all elements of the iterator
*/
public static GENERIC_KEY_BRACES KEY_TYPE[] pour(ITERATOR KEY_GENERIC_TYPE iter, IntFunction<KEY_TYPE[]> action) {
public static <T, E> E[] pour(ITERATOR KEY_GENERIC_TYPE iter, IntFunction<E[]> action) {
return pour(iter, Integer.MAX_VALUE, action);
}
@@ -158,7 +158,7 @@ public class ARRAYS
* @ArrayType(T)
* @return array with all requested elements of the iterator
*/
public static GENERIC_KEY_BRACES KEY_TYPE[] pour(ITERATOR KEY_GENERIC_TYPE iter, int max, IntFunction<KEY_TYPE[]> action) {
public static <T, E> E[] pour(ITERATOR KEY_GENERIC_TYPE iter, int max, IntFunction<E[]> action) {
COLLECTIONS.CollectionWrapper KEY_GENERIC_TYPE list = COLLECTIONS.wrapper();
ITERATORS.pour(iter, list, max);
return list.TO_ARRAY(action.apply(list.size()));