-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: mramotar <[email protected]>
- Loading branch information
1 parent
6589f42
commit 86b9f39
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
.../core/src/commonMain/kotlin/org/mobilenativefoundation/paging/core/MutablePagingBuffer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.mobilenativefoundation.paging.core | ||
|
||
/** | ||
* Represents a mutable version of [PagingBuffer] that allows adding and updating paging data. | ||
* | ||
* @param Id The type of the unique identifier for each item in the paged data. | ||
* @param K The type of the key used for paging. | ||
* @param P The type of the parameters associated with each page of data. | ||
* @param D The type of the data items. | ||
*/ | ||
interface MutablePagingBuffer<Id : Comparable<Id>, K : Any, P : Any, D : Any> : PagingBuffer<Id, K, P, D> { | ||
/** | ||
* Puts the loaded page of data associated with the specified [PagingSource.LoadParams] into the buffer. | ||
* | ||
* @param params The [PagingSource.LoadParams] associated with the loaded page. | ||
* @param page The [PagingSource.LoadResult.Data] representing the loaded page of data. | ||
*/ | ||
fun put(params: PagingSource.LoadParams<K, P>, page: PagingSource.LoadResult.Data<Id, K, P, D>) | ||
} |