blob: 0465181aff03101f51d79e972883156910e48f7b [file] [log] [blame]
<html devsite="true">
<head>
<title>ItemKeyedDataSource.LoadParams</title>
{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>ItemKeyedDataSource.LoadParams</h1>
{% setvar page_path %}androidx/paging/ItemKeyedDataSource.LoadParams.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_kotlin_switcher2.md" %}
<p>
<pre>open class ItemKeyedDataSource.LoadParams&lt;Key&nbsp;:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt;</pre>
</p>
<hr>
<p>Holder object for inputs to <code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.html#loadBefore(androidx.paging.ItemKeyedDataSource.LoadParams)">loadBefore</a></code> and <code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.html#loadAfter(androidx.paging.ItemKeyedDataSource.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;:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt;</code></td>
<td width="100%">
<p>Type of data used to query <code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.html">Value</a></code> types out of the <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Summary</h2>
<div class="devsite-table-wrapper">
<table class="responsive">
<thead>
<tr>
<th colspan="2"><h3>Public properties</h3></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>Key</code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams.html#key()">key</a></code></div>
<p>Load items before/after this key.</p>
</td>
</tr>
<tr>
<td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
<td width="100%">
<div><code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.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;:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt; <a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams.html#LoadParams(kotlin.Any,kotlin.Int)">LoadParams</a>(key:&nbsp;Key,&nbsp;requestedLoadSize:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public properties</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">val&nbsp;<a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams.html#key()">key</a>:&nbsp;Key</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">val&nbsp;<a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams.html#requestedLoadSize()">requestedLoadSize</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</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">&lt;Key&nbsp;:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt; <a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.LoadParams.html#LoadParams(kotlin.Any,kotlin.Int)">LoadParams</a>(key:&nbsp;Key,&nbsp;requestedLoadSize:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</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;:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html">Any</a>&gt;</code></td>
<td width="100%">
<p>Type of data used to query <code><a href="/reference/kotlin/androidx/paging/ItemKeyedDataSource.html">Value</a></code> types out of the <code><a href="/reference/kotlin/androidx/paging/DataSource.html">DataSource</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>