code: public static <TSource, TResult> List<TResult> map(Collection<TSource> items, Mapper<TSource, TResult> mapper) {
          if (isEmpty(items)) {
              return new ArrayList<>();
          }
  
          List<TResult> result = new ArrayList<>(items.size());
  
          for (TSource item : items) {
              TResult mappedItem = mapper.map(item);
              result.add(mappedItem);
          }
  
          return result;
      }
docs: Projects each element of a collection into a new collection.
  
  @param items source items
  @param mapper mapping function
  @param <TSource> type of elements in the source collection
  @param <TResult> type of elements in the resulting collection
  @return a new collection with projected element values