PagingDataFutures

public final class PagingDataFutures


Summary

Public constructors

Public methods

static final @NonNull PagingData<@NonNull T>
<T extends Object> PagingDataFutures.filter(
    PagingData<T> receiver,
    AsyncFunction<T, Boolean> predicate,
    Executor executor
)

Returns a PagingData containing only elements matching the given predicate.

static final @NonNull PagingData<@NonNull R>
<T extends Object, R extends Object> PagingDataFutures.flatMap(
    PagingData<T> receiver,
    AsyncFunction<T, Iterable<R>> transform,
    Executor executor
)

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> PagingDataFutures.insertSeparators(
    PagingData<T> receiver,
    AsyncFunction<AdjacentItems<T>, R> generator,
    Executor executor
)

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> PagingDataFutures.map(
    PagingData<T> receiver,
    AsyncFunction<T, R> transform,
    Executor executor
)

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

Public constructors

PagingDataFutures

public final PagingDataFutures()

Public methods

PagingDataFutures.filter

public static final @NonNull PagingData<@NonNull T> <T extends Object> PagingDataFutures.filter(
  &nb