| <html devsite="true"> |
| <head> |
| <title>CombinedLoadStates</title> |
| {% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <h1>CombinedLoadStates</h1> |
| {% setvar page_path %}androidx/paging/CombinedLoadStates.html{% endsetvar %} |
| {% setvar can_switch %}1{% endsetvar %} |
| {% include "reference/_java_switcher2.md" %} |
| <p> |
| <pre>public data final class CombinedLoadStates</pre> |
| </p> |
| <hr> |
| <p>Collection of pagination <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>s for both a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>, and <code><a href="/reference/androidx/paging/RemoteMediator.html">RemoteMediator</a></code>.</p> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public fields</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#append()">append</a></code></div> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.APPEND.html">APPEND</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code></div> |
| <p><code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> corresponding to loads from a <code><a href="/reference/androidx/paging/RemoteMediator.html">RemoteMediator</a></code>, or <code>null</code> if <code><a href="/reference/androidx/paging/RemoteMediator.html">RemoteMediator</a></code> not present.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#prepend()">prepend</a></code></div> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.PREPEND.html">PREPEND</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/LoadState.html">LoadState</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#refresh()">refresh</a></code></div> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.REFRESH.html">REFRESH</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code></div> |
| <p><code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> corresponding to loads from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <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><a href="/reference/androidx/paging/CombinedLoadStates.html#CombinedLoadStates(androidx.paging.LoadStates,androidx.paging.LoadStates)">CombinedLoadStates</a>(<a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> source, @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> mediator)</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <thead> |
| <tr> |
| <th colspan="2"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#component1()">component1</a>()</code></div> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#component2()">component2</a>()</code></div> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final <a href="/reference/androidx/paging/CombinedLoadStates.html">CombinedLoadStates</a></code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#copy(androidx.paging.LoadStates,androidx.paging.LoadStates)">copy</a>(<a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> source, @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> mediator)</code></div> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final @<a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> void</code></td> |
| <td width="100%"> |
| <div><code><a href="/reference/androidx/paging/CombinedLoadStates.html#forEach(kotlin.Function3)">forEach</a>(Function3<<a href="/reference/androidx/paging/LoadType.html">LoadType</a>, <a href="https://developer.android.com/reference/java/lang/Boolean.html">Boolean</a>, <a href="/reference/androidx/paging/LoadState.html">LoadState</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> op)</code></div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <h2>Public fields</h2> |
| <div><a name="getAppend()"></a><a name="setAppend()"></a><a name="getAppend--"></a><a name="setAppend--"></a> |
| <h3 class="api-name" id="append()">append</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/LoadState.html">LoadState</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#append()">append</a></pre> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.APPEND.html">APPEND</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| <p>For use cases that require reacting to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> specifically, e.g., showing cached data when network loads via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> fail, <code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> exposed via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> should be used directly.</p> |
| </div> |
| <div><a name="getMediator()"></a><a name="setMediator()"></a><a name="getMediator--"></a><a name="setMediator--"></a> |
| <h3 class="api-name" id="mediator()">mediator</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a><br>public final @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></pre> |
| <p><code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> corresponding to loads from a <code><a href="/reference/androidx/paging/RemoteMediator.html">RemoteMediator</a></code>, or <code>null</code> if <code><a href="/reference/androidx/paging/RemoteMediator.html">RemoteMediator</a></code> not present.</p> |
| </div> |
| <div><a name="getPrepend()"></a><a name="setPrepend()"></a><a name="getPrepend--"></a><a name="setPrepend--"></a> |
| <h3 class="api-name" id="prepend()">prepend</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/LoadState.html">LoadState</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#prepend()">prepend</a></pre> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.PREPEND.html">PREPEND</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| <p>For use cases that require reacting to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> specifically, e.g., showing cached data when network loads via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> fail, <code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> exposed via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> should be used directly.</p> |
| </div> |
| <div><a name="getRefresh()"></a><a name="setRefresh()"></a><a name="getRefresh--"></a><a name="setRefresh--"></a> |
| <h3 class="api-name" id="refresh()">refresh</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/LoadState.html">LoadState</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#refresh()">refresh</a></pre> |
| <p>Convenience for accessing <code><a href="/reference/androidx/paging/LoadType.REFRESH.html">REFRESH</a></code><code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code>, which always defers to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> if it exists, otherwise equivalent to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code>.</p> |
| <p>For use cases that require reacting to <code><a href="/reference/androidx/paging/LoadState.html">LoadState</a></code> of <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> specifically, e.g., showing cached data when network loads via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> fail, <code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> exposed via <code><a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></code> and <code><a href="/reference/androidx/paging/CombinedLoadStates.html#mediator()">mediator</a></code> should be used directly.</p> |
| </div> |
| <div><a name="getSource()"></a><a name="setSource()"></a><a name="getSource--"></a><a name="setSource--"></a> |
| <h3 class="api-name" id="source()">source</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#source()">source</a></pre> |
| <p><code><a href="/reference/androidx/paging/LoadStates.html">LoadStates</a></code> corresponding to loads from a <code><a href="/reference/androidx/paging/PagingSource.html">PagingSource</a></code>.</p> |
| </div> |
| <h2>Public constructors</h2> |
| <div><a name="CombinedLoadStates(androidx.paging.LoadStates, androidx.paging.LoadStates)"></a><a name="CombinedLoadStates-androidx.paging.LoadStates-androidx.paging.LoadStates-"></a> |
| <h3 class="api-name" id="CombinedLoadStates(androidx.paging.LoadStates,androidx.paging.LoadStates)">CombinedLoadStates</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/CombinedLoadStates.html#CombinedLoadStates(androidx.paging.LoadStates,androidx.paging.LoadStates)">CombinedLoadStates</a>(<a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> source, @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> mediator)</pre> |
| </div> |
| <h2>Public methods</h2> |
| <div><a name="component1--"></a> |
| <h3 class="api-name" id="component1()">component1</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#component1()">component1</a>()</pre> |
| </div> |
| <div><a name="component2--"></a> |
| <h3 class="api-name" id="component2()">component2</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a><br>public final @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#component2()">component2</a>()</pre> |
| </div> |
| <div><a name="copy(androidx.paging.LoadStates, androidx.paging.LoadStates)"></a><a name="copy-androidx.paging.LoadStates-androidx.paging.LoadStates-"></a> |
| <h3 class="api-name" id="copy(androidx.paging.LoadStates,androidx.paging.LoadStates)">copy</h3> |
| <pre class="api-signature no-pretty-print">public final <a href="/reference/androidx/paging/CombinedLoadStates.html">CombinedLoadStates</a> <a href="/reference/androidx/paging/CombinedLoadStates.html#copy(androidx.paging.LoadStates,androidx.paging.LoadStates)">copy</a>(<a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> source, @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a> <a href="/reference/androidx/paging/LoadStates.html">LoadStates</a> mediator)</pre> |
| </div> |
| <div><a name="forEach-kotlin.Function3-"></a> |
| <h3 class="api-name" id="forEach(kotlin.Function3)">forEach</h3> |
| <pre class="api-signature no-pretty-print">@<a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a><br>public final @<a href="/reference/[JVM root]/<ERROR CLASS>.html"><ERROR CLASS></a> void <a href="/reference/androidx/paging/CombinedLoadStates.html#forEach(kotlin.Function3)">forEach</a>(Function3<<a href="/reference/androidx/paging/LoadType.html">LoadType</a>, <a href="https://developer.android.com/reference/java/lang/Boolean.html">Boolean</a>, <a href="/reference/androidx/paging/LoadState.html">LoadState</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> op)</pre> |
| </div> |
| </body> |
| </html> |