Class ScrollResponse<T>
java.lang.Object
cn.dinodev.spring.commons.response.Response<Collection<? extends T>>
cn.dinodev.spring.commons.response.ScrollResponse<T>
- Author:
- Cody Lu
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedScrollResponse(int code, String msg) protectedScrollResponse(Collection<? extends T> list, String nextCursor, boolean hasMore) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ScrollResponse<T>static <T> ScrollResponse<T>set(Collection<? extends T> list, String nextCursor, boolean hasMore) Response<Collection<? extends T>>setData(Collection<? extends T> list) static <T> ScrollResponse<T>success(Collection<? extends T> list, String nextCursor, boolean hasMore) static <T,S> ScrollResponse<T> success(Collection<S> list, Function<Collection<S>, Collection<? extends T>> converter, String nextCursor, boolean hasMore) static <T> ScrollResponse<T>successWithMore(Collection<? extends T> list, String nextCursor) static <T> ScrollResponse<T>successWithNoMore(Collection<? extends T> list)
-
Constructor Details
-
ScrollResponse
-
ScrollResponse
protected ScrollResponse(Collection<? extends T> list, @Nullable String nextCursor, boolean hasMore)
-
-
Method Details
-
set
public ScrollResponse<T> set(Collection<? extends T> list, @Nullable String nextCursor, boolean hasMore) -
setData
-
success
public static <T> ScrollResponse<T> success(@Nonnull Collection<? extends T> list, @Nullable String nextCursor, boolean hasMore) -
success
public static <T,S> ScrollResponse<T> success(@Nonnull Collection<S> list, @Nonnull Function<Collection<S>, Collection<? extends T>> converter, @Nullable String nextCursor, boolean hasMore) -
successWithMore
public static <T> ScrollResponse<T> successWithMore(@Nonnull Collection<? extends T> list, @Nonnull String nextCursor) -
successWithNoMore
-
failPage
-
failPage
-