PagingRx

public final class PagingRx


Summary

Public fields

final @NonNull Flowable<@NonNull PagingData<@NonNull Value>>

A Flowable of PagingData, which mirrors the stream provided by Pager.flow, but exposes it as a Flowable.

final @NonNull Observable<@NonNull PagingData<@NonNull Value>>

An Observable of PagingData, which mirrors the stream provided by Pager.flow, but exposes it as an Observable.

Public methods

static final @ExperimentalCoroutinesApi @NonNull Observable<@NonNull PagingData<@NonNull T>>
<T extends Object> PagingRx.cachedIn(
    @NonNull Observable<@NonNull PagingData<@NonNull T>> receiver,
    @NonNull CoroutineScope scope
)

Operator which caches an Observable of PagingData within a CoroutineScope.

static final @ExperimentalCoroutinesApi @NonNull Flowable<@NonNull PagingData<@NonNull T>>
<T extends Object> PagingRx.cachedIn(
    @NonNull Flowable<@NonNull PagingData<@NonNull T>> receiver,
    @NonNull CoroutineScope scope
)

Operator which caches a Flowable of PagingData within a CoroutineScope.

static final @NonNull PagingData<@NonNull T>
<T extends Object> PagingRx.filter(
    @NonNull PagingData<@NonNull T> receiver,
    @NonNull Function1<@NonNull T, @NonNull Single<@NonNull Boolean>> predicate
)

Returns a PagingData containing only elements matching the given predicate.

static final @NonNull PagingData<@NonNull R>
<T extends Object, R extends Object> PagingRx.flatMap(
    @NonNull PagingData<@NonNull T> receiver,
    @NonNull Function1<@NonNull T, @NonNull Single<@NonNull Iterable<@NonNull R>>> transform
)

Returns a PagingData of all elements returned from applying the given transform to each element, as it is loaded.

static final @NonNull PagingData<@NonNull R>
<T extends R, R extends Object> PagingRx.insertSeparators(
    @NonNull PagingData<@NonNull T> receiver,
    @NonNull Function2<@NonNull T, @NonNull T, @NonNull Maybe<@NonNull R>> generator
)

Returns a PagingData containing each original element, with an optional separator generated by generator, given the elements before and after (or null, in boundary conditions).

static final @NonNull PagingData<@NonNull R>
<T extends Object, R extends Object> PagingRx.map(
    @NonNull PagingData<@NonNull T> receiver,
    @NonNull Function1<@NonNull T, @NonNull Single<@NonNull R>> transform
)

Returns a PagingData containing the result of applying the given transform to each element, as it is loaded.

Public fields

flowable

@NonNull
public final @NonNull Flowable<@NonNull PagingData<@NonNull Value>> flowable

A Flowable of PagingData, which mirrors the stream provided by Pager.flow, but exposes it as a Flowable.

NOTE: Instances of PagingData emitted by this Flowable are not re-usable and cannot be submitted multiple times. This is especially rel