public class Paginator extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_MAX_RESULTS  | 
| Constructor and Description | 
|---|
Paginator()  | 
| Modifier and Type | Method and Description | 
|---|---|
static <T> Collection<T> | 
getLast(Collection<T> input,
       javax.ws.rs.core.UriInfo uriInfo)  | 
static int | 
getMaxResults(javax.ws.rs.core.UriInfo uriInfo)  | 
static int | 
getMaxResults(javax.ws.rs.core.UriInfo uriInfo,
             int defaultValue)  | 
static <W,T> @NotNull PageResponse<T> | 
getPage(@NotNull Collection<W> input,
       @NotNull PageRequest pageRequest,
       @NotNull com.google.common.base.Function<? super W,T> transformer)
Deprecated. 
 
since 5.10 use  
PaginationService instead | 
static <T> org.apache.commons.lang3.Range<Integer> | 
getPaginationRange(Collection<T> input,
                  javax.ws.rs.core.UriInfo uriInfo)  | 
static org.apache.commons.lang3.Range<Integer> | 
getPaginationRange(int resultSize,
                  javax.ws.rs.core.UriInfo uriInfo)  | 
static org.apache.commons.lang3.Range<Integer> | 
getPaginationRange(javax.ws.rs.core.UriInfo uriInfo)  | 
static <T> PagerPaginationSupport | 
getPaginationSupport(com.atlassian.user.search.page.Pager<T> pager,
                    javax.ws.rs.core.UriInfo uriInfo)  | 
static int | 
getStartIndex(javax.ws.rs.core.UriInfo uriInfo,
             int maxResults)  | 
static <T> List<T> | 
paginate(Collection<T> input,
        org.apache.commons.lang3.Range<Integer> range)  | 
public static final int DEFAULT_MAX_RESULTS
public static <T> Collection<T> getLast(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo)
public static int getStartIndex(javax.ws.rs.core.UriInfo uriInfo,
                                int maxResults)
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo)
public static int getMaxResults(javax.ws.rs.core.UriInfo uriInfo,
                                int defaultValue)
public static org.apache.commons.lang3.Range<Integer> getPaginationRange(javax.ws.rs.core.UriInfo uriInfo)
public static org.apache.commons.lang3.Range<Integer> getPaginationRange(int resultSize, javax.ws.rs.core.UriInfo uriInfo)
public static <T> org.apache.commons.lang3.Range<Integer> getPaginationRange(Collection<T> input, javax.ws.rs.core.UriInfo uriInfo)
public static <T> PagerPaginationSupport getPaginationSupport(com.atlassian.user.search.page.Pager<T> pager, javax.ws.rs.core.UriInfo uriInfo)
public static <T> List<T> paginate(Collection<T> input, org.apache.commons.lang3.Range<Integer> range)
@NotNull @Deprecated public static <W,T> @NotNull PageResponse<T> getPage(@NotNull @NotNull Collection<W> input, @NotNull @NotNull PageRequest pageRequest, @NotNull @NotNull com.google.common.base.Function<? super W,T> transformer)
PaginationService insteadW - domain objectT - rest objectinput - full list of domain objectspageRequest - which page of information requiredtransformer - to convert domain object into rest objectCopyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.