blob: 2af40dd8872d72cfcc133feee2012431f1df456e [file] [log] [blame]
<html devsite="true">
<head>
<title>PageKeyedDataSource.LoadParams</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>PageKeyedDataSource.LoadParams</h1>
{% setvar page_path %}androidx/paging/PageKeyedDataSource.LoadParams.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_java_switcher2.md" %}
<p>
<pre>public class PageKeyedDataSource.LoadParams&lt;Key&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt;</pre>
</p>
<hr>
<p>Holder object for inputs to <code><a href="/reference/androidx/paging/PageKeyedDataSource.html#loadBefore(androidx.paging.PageKeyedDataSource.LoadParams)">loadBefore</a></code> and <code><a href="/reference/androidx/paging/PageKeyedDataSource.html#loadAfter(androidx.paging.PageKeyedDataSource.LoadParams)">loadAfter</a></code>.</p>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;Key&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt;</code></td>
<td width="100%">
<p>Type of data used to query pages.</p>
</td>
</tr>
</tbody>
</table>
</div>
<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 Key</code></td>
<td width="100%">
<div><code><a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#key()">key</a></code></div>
<p>Load items before/after this key.</p>
</td>
</tr>
<tr>
<td><code>final int</code></td>
<td width="100%">
<div><code><a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#requestedLoadSize()">requestedLoadSize</a></code></div>
<p>Requested number of items to load.</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>&lt;Key&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#LoadParams(kotlin.Any,kotlin.Int)">LoadParams</a>(Key&nbsp;key,&nbsp;int&nbsp;requestedLoadSize)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public fields</h2>
<div><a name="getKey()"></a><a name="setKey()"></a><a name="getKey--"></a><a name="setKey--"></a>
<h3 class="api-name" id="key()">key</h3>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;Key&nbsp;<a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#key()">key</a></pre>
<p>Load items before/after this key.</p>
<p>Returned data must begin directly adjacent to this position.</p>
</div>
<div><a name="getRequestedLoadSize()"></a><a name="setRequestedLoadSize()"></a><a name="getRequestedLoadSize--"></a><a name="setRequestedLoadSize--"></a>
<h3 class="api-name" id="requestedLoadSize()">requestedLoadSize</h3>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;int&nbsp;<a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#requestedLoadSize()">requestedLoadSize</a></pre>
<p>Requested number of items to load.</p>
<p>Returned page can be of this size, but it may be altered if that is easier, e.g. a network data source where the backend defines page size.</p>
</div>
<h2>Public constructors</h2>
<div><a name="LoadParams(kotlin.Any, kotlin.Int)"></a><a name="LoadParams-kotlin.Any-kotlin.Int-"></a>
<h3 class="api-name" id="LoadParams(kotlin.Any,kotlin.Int)">LoadParams</h3>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;&lt;Key&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt; <a href="/reference/androidx/paging/PageKeyedDataSource.LoadParams.html#LoadParams(kotlin.Any,kotlin.Int)">LoadParams</a>(Key&nbsp;key,&nbsp;int&nbsp;requestedLoadSize)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2">Parameters</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>&lt;Key&nbsp;extends&nbsp;<a href="https://developer.android.com/reference/java/lang/Object.html">Object</a>&gt;</code></td>
<td width="100%">
<p>Type of data used to query pages.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>