Package io.smallrye.beanbag
Class Util
- java.lang.Object
-
- io.smallrye.beanbag.Util
-
public final class Util extends Object
Shared utilities.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R,T>
List<R>mapList(List<T> input, Function<T,R> mapper, IntFunction<R[]> generator)Efficiently create a copy of the input list with each list element being transformed by the given function.
-
-
-
Method Detail
-
mapList
public static <R,T> List<R> mapList(List<T> input, Function<T,R> mapper, IntFunction<R[]> generator)
Efficiently create a copy of the input list with each list element being transformed by the given function.- Type Parameters:
R- the output list element typeT- the input list element type- Parameters:
input- the input list (must not benull)mapper- the mapping function (must not benull)generator- the generator for an array of typeR(must not benull)- Returns:
- the transformed list (not
null)
-
-