public class PageResponseImpl<T> extends Object implements PageResponse<T>
Modifier and Type | Class and Description |
---|---|
static class |
PageResponseImpl.Builder<E,B extends PageResponseImpl.Builder<E,B>> |
Modifier | Constructor and Description |
---|---|
protected |
PageResponseImpl(PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> builder) |
Modifier and Type | Method and Description |
---|---|
static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder<T,?>> |
builder() |
static <T> PageResponseImpl<T> |
empty(boolean hasMore) |
static <T> PageResponseImpl<T> |
empty(boolean hasMore,
LimitedRequest request) |
static <T> PageResponseImpl<T> |
empty(boolean hasMore,
PageRequest request) |
static <T> PageResponse<T> |
filteredPageResponse(LimitedRequest limitedRequest,
List<T> items,
com.google.common.base.Predicate<? super T> predicate)
Reduces a list of items for a limited request by the predicate provided.
|
static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> |
from(Iterable<T> list,
boolean hasMore) |
static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> |
fromSingle(T element,
boolean hasMore) |
PageRequest |
getPageRequest() |
List<T> |
getResults() |
boolean |
hasMore()
Indicates whether the source has more results after this page.
|
Iterator<T> |
iterator() |
int |
size() |
String |
toString() |
static <F,T> PageResponseImpl<T> |
transform(PageResponse<F> input,
com.google.common.base.Function<F,T> mapper)
Converts a given PageResponse contains items of type F into an equivalent PageResponse with items of type T,
transformed by the given mapper.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
protected PageResponseImpl(PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> builder)
public PageRequest getPageRequest()
getPageRequest
in interface PageResponse<T>
public int size()
size
in interface PageResponse<T>
public List<T> getResults()
getResults
in interface PageResponse<T>
public boolean hasMore()
PageResponse
hasMore
in interface PageResponse<T>
public static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> from(Iterable<T> list, boolean hasMore)
public static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder> fromSingle(T element, boolean hasMore)
public static <F,T> PageResponseImpl<T> transform(PageResponse<F> input, com.google.common.base.Function<F,T> mapper)
public static <T> PageResponseImpl<T> empty(boolean hasMore)
public static <T> PageResponseImpl<T> empty(boolean hasMore, PageRequest request)
public static <T> PageResponseImpl<T> empty(boolean hasMore, LimitedRequest request)
public static <T> PageResponse<T> filteredPageResponse(LimitedRequest limitedRequest, List<T> items, com.google.common.base.Predicate<? super T> predicate)
public static <T> PageResponseImpl.Builder<T,? extends PageResponseImpl.Builder<T,?>> builder()
Copyright © 2003–2017 Atlassian. All rights reserved.