public class DefaultListBuilder<T> extends Object implements ListBuilder<T>
| Modifier and Type | Method and Description |
|---|---|
int |
getAvailableSize()
Gets the total number of elements available to return if the whole list were requested
|
List<T> |
getPage(int offset,
int maxResults)
Gets a page of results by providing the offset of the first element in the page, and the page size.
|
List<T> |
getRange(int startIndex,
int endIndex)
Gets a range of results by providing the indexes of the first and last elements you wish to return.
|
Iterator<List<T>> |
iterator() |
static <T> DefaultListBuilder<T> |
newInstance(ListBuilderCallback<T> callback)
Instantiate a new default ListBuilder from a callback.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static <T> DefaultListBuilder<T> newInstance(ListBuilderCallback<T> callback)
callback - the callback from which the builder should retrieve datapublic List<T> getRange(int startIndex, int endIndex)
ListBuildergetRange in interface ListBuilder<T>startIndex - the zero-based index of the first result you wish returnedendIndex - the zero-based index of the last result you wish returnedpublic List<T> getPage(int offset, int maxResults)
ListBuildergetPage in interface ListBuilder<T>offset - the zero-based index of the first result you wish returnedmaxResults - the size of the page requestedpublic int getAvailableSize()
ListBuildergetAvailableSize in interface ListBuilder<T>Copyright © 2003–2018 Atlassian. All rights reserved.