blob: f59342b68b9242301dd9cbb4d2d95c920db5c1e9 [file] [log] [blame]
<html devsite="true">
<head>
<title>ItemKeyedDataSource.LoadInitialParams</title>
{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %}
{% include "_shared/_reference-head-tags.html" %}
</head>
<body>
<h1>ItemKeyedDataSource.LoadInitialParams</h1>
{% setvar page_path %}androidx/paging/ItemKeyedDataSource.LoadInitialParams.html{% endsetvar %}
{% setvar can_switch %}1{% endsetvar %}
{% include "reference/_java_switcher2.md" %}
<p>
<pre>public class ItemKeyedDataSource.LoadInitialParams&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/ItemKeyedDataSource.html#loadInitial(androidx.paging.ItemKeyedDataSource.LoadInitialParams)">loadInitial</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 <code><a href="/reference/androidx/paging/ItemKeyedDataSource.html">Value</a></code> types out of the <code><a href="/reference/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 fields</h3></th>
</tr>
</thead>
<tbody>
<tr>
<td><code>final boolean</code></td>
<td width="100%">
<div><code><a href="/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams.html#placeholdersEnabled()">placeholdersEnabled</a></code></div>
<p>Defines whether placeholders are enabled, and whether the loaded total count will be ignored.</p>
</td>
</tr>
<tr>
<td><code>final @<a href="/reference/androidx/annotation/Nullable.html">Nullable</a>&nbsp;Key</code></td>
<td width="100%">
<div><code><a href="/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams.html#requestedInitialKey()">requestedInitialKey</a></code></div>
<p>Load items around this key, or at the beginning of the data set if <code>null</code> is passed.</p>
</td>
</tr>
<tr>
<td><code>final int</code></td>
<td width="100%">
<div><code><a href="/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams.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/ItemKeyedDataSource.LoadInitialParams.html#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean)">LoadInitialParams</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a>&nbsp;Key&nbsp;requestedInitialKey,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;requestedLoadSize,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;placeholdersEnabled<br>)</code></div>
</td>
</tr>
</tbody>
</table>
</div>
<h2>Public fields</h2>
<div><a name="getPlaceholdersEnabled()"></a><a name="setPlaceholdersEnabled()"></a><a name="getPlaceholdersEnabled--"></a><a name="setPlaceholdersEnabled--"></a>
<h3 class="api-name" id="placeholdersEnabled()">placeholdersEnabled</h3>
<pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;boolean&nbsp;<a href="/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams.html#placeholdersEnabled()">placeholdersEnabled</a></pre>
<p>Defines whether placeholders are enabled, and whether the loaded total count will be ignored.</p>
</div>
<div><a name="getRequestedInitialKey()"></a><a name="setRequestedInitialKey()"></a><a name="getRequestedInitialKey--"></a><a name="setRequestedInitialKey--"></a>
<h3 class="api-name" id="requestedInitialKey()">requestedInitialKey</h3>
<pre class="api-signature no-pretty-print">@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a><br>public&nbsp;final&nbsp;@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a>&nbsp;Key&nbsp;<a href="/reference/androidx/paging/ItemKeyedDataSource.LoadInitialParams.html#requestedInitialKey()">requestedInitialKey</a></pre>
<p>Load items around this key, or at the beginning of the data set if <code>null</code> is passed.</p>
<p>Note that this key is generally a hint, and may be ignored if you want to always load from the beginning.</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/ItemKeyedDataSource.LoadInitialParams.html#requestedLoadSize()">requestedLoadSize</a></pre>
<p>Requested number of items to load.</p>
<p>Note that this may be larger than available data.</p>
</div>
<h2>Public constructors</h2>
<div><a name="LoadInitialParams(kotlin.Any, kotlin.Int, kotlin.Boolean)"></a><a name="LoadInitialParams-kotlin.Any-kotlin.Int-kotlin.Boolean-"></a>
<h3 class="api-name" id="LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean)">LoadInitialParams</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/ItemKeyedDataSource.LoadInitialParams.html#LoadInitialParams(kotlin.Any,kotlin.Int,kotlin.Boolean)">LoadInitialParams</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="/reference/androidx/annotation/Nullable.html">Nullable</a>&nbsp;Key&nbsp;requestedInitialKey,<br>&nbsp;&nbsp;&nbsp;&nbsp;int&nbsp;requestedLoadSize,<br>&nbsp;&nbsp;&nbsp;&nbsp;boolean&nbsp;placeholdersEnabled<br>)</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 <code><a href="/reference/androidx/paging/ItemKeyedDataSource.html">Value</a></code> types out of the <code><a href="/reference/androidx/paging/DataSource.html">DataSource</a></code>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>