code: @NotNull
      public static <T, U, A, R> Collector<T, ?, R> mapping(
              @NotNull final Function<? super T, ? extends U> mapper,
              @NotNull final Collector<? super U, A, R> downstream) {
  
          final BiConsumer<A, ? super U> accumulator = downstream.accumulator();
          return new CollectorsImpl<T, A, R>(
  
                  downstream.supplier(),
  
                  new BiConsumer<A, T>() {
                      @Override
                      public void accept(A a, T t) {
                          accumulator.accept(a, mapper.apply(t));
                      }
                  },
  
                  downstream.finisher()
          );
      }
docs: Returns a {@code Collector} that performs mapping before accumulation.
  
  @param <T> the type of the input elements
  @param <U> the result type of mapping function
  @param <A> the accumulation type
  @param <R> the result type of collector
  @param mapper  a function that performs mapping to input elements
  @param downstream  the collector of mapped elements
  @return a {@code Collector}