Class Util

java.lang.Object
io.smallrye.beanbag.Util

public final class Util extends Object
Shared utilities.
  • Method Details

    • 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 type
      T - the input list element type
      Parameters:
      input - the input list (must not be null)
      mapper - the mapping function (must not be null)
      generator - the generator for an array of type R (must not be null)
      Returns:
      the transformed list (not null)