LoadStates


public final class LoadStates


Collection of pagination LoadStates - refresh, prepend, and append.

Summary

Public constructors

LoadStates(
    @NonNull LoadState refresh,
    @NonNull LoadState prepend,
    @NonNull LoadState append
)

Public methods

final @NonNull LoadState

LoadState corresponding to LoadType.APPEND loads.

final @NonNull LoadState

LoadState corresponding to LoadType.PREPEND loads.

final @NonNull LoadState

LoadState corresponding to LoadType.REFRESH loads.

final boolean

Returns true if either one of refresh, append, or prepend is in Error state.

final boolean

Returns true if all three LoadState refresh, append, and prepend are in NotLoading state.

Public constructors

LoadStates

Added in 3.0.0
public LoadStates(
    @NonNull LoadState refresh,
    @NonNull LoadState prepend,
    @NonNull LoadState append
)

Public methods

getAppend

Added in 3.0.0
public final @NonNull LoadState getAppend()

LoadState corresponding to LoadType.APPEND loads.

getPrepend

Added in 3.0.0
public final @NonNull LoadState getPrepend()

LoadState corresponding to LoadType.PREPEND loads.

getRefresh

Added in 3.0.0
public final @NonNull LoadState getRefresh()

LoadState corresponding to LoadType.REFRESH loads.

hasError

Added in 3.3.1
public final boolean hasError()

Returns true if either one of refresh, append, or prepend is in Error state.

isIdle

Added in 3.3.1
public final boolean isIdle()

Returns true if all three LoadState refresh, append, and prepend are in NotLoading state.