paging/common/src/main/java/androidx/paging/DataSource.java
@NonNull
        public <ToValue> DataSource.Factory<Key, ToValue> mapByPage(
                @NonNull final Function<List<Value>, List<ToValue>> function) {
            return new Factory<Key, ToValue>() {
                @Override
                public DataSource<Key, ToValue> create() {
                    return Factory.this.create().mapByPage(function);
                }
            };
        }
/**
         * Applies the given function to each value emitted by DataSources produced by this Factory.
         * <p>
         * Same as {@link #map(Function)}, but allows for batch conversions.
         *
         * @param function Function that runs on each loaded page, 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 #map(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  #map(Function), but allows for batch conversions.

@param function Function that runs on each loaded page, 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 #map ( Function ) but allows for batch conversions . @param function Function that runs on each loaded page 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> mapByPage(
                @NonNull final Function<List<Value>, List<ToValue>> function) {
            return new Factory<Key, ToValue>() {
                @Override
                public DataSource<Key, ToValue> create() {
                    return Factory.this.create().mapByPage(function);
                }
            };
        }
@ NonNull public < ToValue > DataSource . Factory < Key , ToValue > mapByPage ( @ NonNull final Function < List < Value > , List < ToValue > > function ) { return new Factory < Key , ToValue > ( ) { @ Override public DataSource < Key , ToValue > create ( ) { return Factory . this . create ( ) . mapByPage ( 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 .