| <html devsite="true"> |
| <head> |
| <title>DataSource.Factory</title> |
| {% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>DataSource.Factory</h1> |
| {% setvar page_path %}androidx/paging/DataSource.Factory.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_kotlin_switcher2.md" %} |
| <p> |
| <pre>abstract class DataSource.Factory<Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></pre> |
| </p> |
| <hr> |
| <p>Factory for DataSources.</p> |
| <p>Data-loading systems of an application or library can implement this interface to allow <code>LiveData<PagedList></code>s to be created. For example, Room can provide a <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code> for a given SQL query:</p> |
| <pre class="prettyprint">@Dao<br>interface UserDao {<br> @Query("SELECT * FROM user ORDER BY lastName ASC")<br> public abstract DataSource.Factory<Integer, User> usersByLastName();<br>}</pre> |
| <p>In the above sample, <code>Integer</code> is used because it is the <code>Key</code> type of PositionalDataSource. Currently, Room uses the <code>LIMIT</code>/<code>OFFSET</code> SQL keywords to page a large query with a PositionalDataSource.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Key identifying items in DataSource.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items in the list loaded by the DataSources.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public constructors</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td> |
| <div><code><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#Factory()">Factory</a>()</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public functions</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>() -> <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a><Key, Value></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#asPagingSourceFactory(kotlinx.coroutines.CoroutineDispatcher)">asPagingSourceFactory</a>(fetchDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a>)</code></div> |
| </td> |
| </tr> |
| <tr> |
| <td><code>abstract <a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a><Key, Value></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#create()">create</a>()</code></div> |
| <p>Create a <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <div><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a>(function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><Value, ToValue>)</code></div> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <div><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map(kotlin.Function1)">map</a>(function: (Value) -> ToValue)</code></div> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <div><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a>(<br> function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue>><br>)</code></div> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>open <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <div><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage(kotlin.Function1)">mapByPage</a>(function: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>) -> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue>)</code></div> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public constructors</h2> |
| <div><a name="Factory--"></a> |
| <h3 class="api-name" id="Factory()">Factory</h3> |
| <pre class="api-signature no-pretty-print"><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>, Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#Factory()">Factory</a>()</pre> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><Key : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Key identifying items in DataSource.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><Value : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items in the list loaded by the DataSources.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <h2>Public functions</h2> |
| <div><a name="asPagingSourceFactory-kotlinx.coroutines.CoroutineDispatcher-"></a> |
| <h3 class="api-name" id="asPagingSourceFactory(kotlinx.coroutines.CoroutineDispatcher)">asPagingSourceFactory</h3> |
| <pre class="api-signature no-pretty-print">fun <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#asPagingSourceFactory(kotlinx.coroutines.CoroutineDispatcher)">asPagingSourceFactory</a>(<br> fetchDispatcher: <a href="https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines/-coroutine-dispatcher/index.html">CoroutineDispatcher</a> = Dispatchers.IO<br>): () -> <a href="/reference/kotlin/androidx/paging/PagingSource.html">PagingSource</a><Key, Value></pre> |
| </div> |
| <div><a name="create--"></a> |
| <h3 class="api-name" id="create()">create</h3> |
| <pre class="api-signature no-pretty-print">abstract fun <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#create()">create</a>(): <a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a><Key, Value></pre> |
| <p>Create a <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>.</p> |
| <p>The <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code> should invalidate itself if the snapshot is no longer valid. If a <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code> becomes invalid, the only way to query more data is to create a new <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code> from the Factory.</p> |
| <p><code><a href="/reference/kotlin/androidx/paging/LivePagedListBuilder.html">androidx.paging.LivePagedListBuilder</a></code> for example will construct a new PagedList and DataSource when the current DataSource is invalidated, and pass the new PagedList through the <code>LiveData<PagedList></code> to observers.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a><Key, Value></code></td> |
| <td width="100%"> |
| <p>the new DataSource.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="map--"></a> |
| <h3 class="api-name" id="map()">map</h3> |
| <pre class="api-signature no-pretty-print">open fun <ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a>(function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><Value, ToValue>): <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></pre> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| <p>Same as <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a></code>, but operates on individual items.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <p>A new <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code>, which transforms items using the given function.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items produced by the new <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>, from the passed function.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><Value, ToValue></code></td> |
| <td width="100%"> |
| <p>Function that runs on each loaded item, returning items of a potentially new type.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="map-kotlin.Function1-"></a> |
| <h3 class="api-name" id="map(kotlin.Function1)">map</h3> |
| <pre class="api-signature no-pretty-print">open fun <ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map(kotlin.Function1)">map</a>(function: (Value) -> ToValue): <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></pre> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| <p>An overload of <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a></code> that accepts a kotlin function type.</p> |
| <p>Same as <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a></code>, but operates on individual items.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <p>A new <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code>, which transforms items using the given function.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items produced by the new <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>, from the passed function.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>function: (Value) -> ToValue</code></td> |
| <td width="100%"> |
| <p>Function that runs on each loaded item, returning items of a potentially new type.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="mapByPage--"></a> |
| <h3 class="api-name" id="mapByPage()">mapByPage</h3> |
| <pre class="api-signature no-pretty-print">open fun <ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a>(<br> function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue>><br>): <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></pre> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| <p>Same as <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a></code>, but allows for batch conversions.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <p>A new <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code>, which transforms items using the given function.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items produced by the new <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>, from the passed function.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>function: <a href="/reference/kotlin/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue>></code></td> |
| <td width="100%"> |
| <p>Function that runs on each loaded page, returning items of a potentially new type.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div><a name="mapByPage-kotlin.Function1-"></a> |
| <h3 class="api-name" id="mapByPage(kotlin.Function1)">mapByPage</h3> |
| <pre class="api-signature no-pretty-print">open fun <ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>> <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage(kotlin.Function1)">mapByPage</a>(function: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>) -> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue>): <a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></pre> |
| <p>Applies the given function to each value emitted by DataSources produced by this Factory.</p> |
| <p>An overload of <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#mapByPage()">mapByPage</a></code> that accepts a kotlin function type.</p> |
| <p>Same as <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a></code>, but allows for batch conversions.</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Returns</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a><Key, ToValue></code></td> |
| <td width="100%"> |
| <p>A new <code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html">DataSource.Factory</a></code>, which transforms items using the given function.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">Parameters</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><ToValue : <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>></code></td> |
| <td width="100%"> |
| <p>Type of items produced by the new <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>, from the passed function.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>function: (<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><Value>) -> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><ToValue></code></td> |
| <td width="100%"> |
| <p>Function that runs on each loaded page, returning items of a potentially new type.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2">See also</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.Factory.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#map()">map</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/kotlin/androidx/paging/DataSource.html#mapByPage()">mapByPage</a></code></td> |
| <td width="100%"></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </body> |
| </html> |