paging/common/src/main/java/androidx/paging/DataSource.java
@NonNull
        public <ToValue> DataSource.Factory<Key, ToValue> map(
                @NonNull Function<Value, ToValue> function) {
            return mapByPage(createListFunction(function));
        }
/**
         * Applies the given function to each value emitted by DataSources produced by this Factory.
         * <p>
         * Same as {@link #mapByPage(Function)}, but operates on individual items.
         *
         * @param function Function that runs on each loaded item, returning items of a potentially
         *                  new type.
         * @param <ToValue> Type of items produced by the new DataSource, from the passed function.
         *
         * @return A new DataSource.Factory, which transforms items using the given function.
         *
         * @see #mapByPage(Function)
         * @see DataSource#map(Function)
         * @see DataSource#mapByPage(Function)
         */
Applies the given function to each value emitted by DataSources produced by this Factory.

Same as  #mapByPage(Function), but operates on individual items.

@param function Function that runs on each loaded item, returning items of a potentially
new type.
@param  Type of items produced by the new DataSource, from the passed function.

@return A new DataSource.Factory, which transforms items using the given function.


Applies the given function to each value emitted by DataSources produced by this Factory . Same as #mapByPage ( Function ) but operates on individual items . @param function Function that runs on each loaded item returning items of a potentially new type . @param Type of items produced by the new DataSource from the passed function . @return A new DataSource . Factory which transforms items using the given function .
@NonNull
        public <ToValue> DataSource.Factory<Key, ToValue> map(
                @NonNull Function<Value, ToValue> function) {
            return mapByPage(createListFunction(function));
        }
@ NonNull public < ToValue > DataSource . Factory < Key , ToValue > map ( @ NonNull Function < Value , ToValue > function ) { return mapByPage ( createListFunction ( function ) ) ; }
Applies the given function to each value emitted by DataSources produced by this Factory.
Applies the given function to each value emitted by DataSources produced by this Factory .