com.atlassian.confluence.api.model.pagination
Class PageResponseImpl<T>
java.lang.Object
com.atlassian.confluence.api.model.pagination.PageResponseImpl<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- PageResponse<T>, java.lang.Iterable<T>
public class PageResponseImpl<T>
- extends java.lang.Object
- implements PageResponse<T>
A wrapper around a list of content.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
getPageRequest
public PageRequest getPageRequest()
- Specified by:
getPageRequest
in interface PageResponse<T>
- Returns:
- the request used to produce this response
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iterator
in interface java.lang.Iterable<T>
size
public int size()
- Specified by:
size
in interface PageResponse<T>
- Returns:
- the number of results in this page of results
getResults
public java.util.List<T> getResults()
- Specified by:
getResults
in interface PageResponse<T>
- Returns:
- the results
hasMore
public boolean hasMore()
- Description copied from interface:
PageResponse
- Indicates whether the source has more results after this page.
- Specified by:
hasMore
in interface PageResponse<T>
- Returns:
- true if there are more results
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
from
public static <T> PageResponseImpl.Builder<T> from(java.lang.Iterable<T> list,
boolean hasMore)
fromSingle
public static <T> PageResponseImpl.Builder<T> fromSingle(T element,
boolean hasMore)
empty
public static <T> PageResponseImpl<T> empty(boolean hasMore)
empty
public static <T> PageResponseImpl<T> empty(boolean hasMore,
PageRequest request)
empty
public static <T> PageResponseImpl<T> empty(boolean hasMore,
LimitedRequest request)
filteredPageResponse
public static <T> PageResponse<T> filteredPageResponse(LimitedRequest limitedRequest,
java.util.List<T> items,
com.google.common.base.Predicate<? super T> predicate)
- Reduces a list of items for a limited request by the predicate provided. Useful for permission checks that are
known to the Manager layer...
Copyright © 2003-2014 Atlassian. All Rights Reserved.