{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

CombinedLoadStates

public final class CombinedLoadStates


Collection of pagination LoadStates for both a PagingSource, and RemoteMediator.

Summary

Public constructors

Public methods

boolean
equals(Object other)
final @NonNull <Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

final <Error class: unknown class>

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

final @NonNull <Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

final @NonNull <Error class: unknown class>

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

final @NonNull <Error class: unknown class>

LoadStates corresponding to loads from a PagingSource.

int
@NonNull String

Public constructors

CombinedLoadStates

public CombinedLoadStates(
    @NonNull <Error class: unknown class> refresh,
    @NonNull <Error class: unknown class> prepend,
    @NonNull <Error class: unknown class> append,
    @NonNull <Error class: unknown class> source,
    <Error class: unknown class> mediator
)

Public methods

equals

public boolean equals(Object other)

getAppend

public final @NonNull <Error class: unknown class> getAppend()

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

getMediator

public final <Error class: unknown class> getMediator()

LoadStates corresponding to loads from a RemoteMediator, or null if RemoteMediator not present.

getPrepend

public final @NonNull <Error class: unknown class> getPrepend()

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

getRefresh

public final @NonNull <Error class: unknown class> getRefresh()

Convenience for combined behavior of LoadType.REFRESH LoadState, which generally defers to mediator if it exists, but if previously was LoadState.Loading, awaits for both source and mediator to become LoadState.NotLoading to ensure the remote load was applied.

For use cases that require reacting to LoadState of source and mediator specifically, e.g., showing cached data when network loads via mediator fail, LoadStates exposed via source and mediator should be used directly.

getSource

public final @NonNull <Error class: unknown class> getSource()

LoadStates corresponding to loads from a PagingSource.

hashCode

public int hashCode()

toString

public @NonNull String toString()