API reference
API reference
Select your platform
No SDKs available
No versions available

Page Interface

A single page of data fetched from the server.

See Also

Signature

interface Page<T>

Functions

getContents ()
Returns this page's data.
Signature
abstract fun getContents(): List<T>
Returns
List
getIndex ()
Returns this page's index.
Page indices are not like array indices. For the purposes of storing multiple pages in a data structure, Pages have three guarantees:
  • A page with a higher index should go after the other
  • A page with a lower index should go before the other
  • A newer page should replace an older page with the same index
Using a SortedMap data structure with indices as keys will order pages correctly.
The integer value of the index has no semantic meaning beyond what's described here. Page indices can be negative.
Signature
abstract fun getIndex(): Int
Returns
Int