|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.core.DefaultListBuilder<T>
public class DefaultListBuilder<T>
Skeleton implementation of a list builder that takes care of maintaining the class invariants but delegates the final building of the list to a callback function.
| Method Summary | ||
|---|---|---|
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
|
newInstance(ListBuilderCallback<T> callback)
Instantiate a new default ListBuilder from a callback. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> DefaultListBuilder<T> newInstance(ListBuilderCallback<T> callback)
callback - the callback from which the builder should retrieve data
public List<T> getRange(int startIndex,
int endIndex)
ListBuilder
getRange 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 returned
public List<T> getPage(int offset,
int maxResults)
ListBuilder
getPage in interface ListBuilder<T>offset - the zero-based index of the first result you wish returnedmaxResults - the size of the page requested
public Iterator<List<T>> iterator()
iterator in interface Iterable<List<T>>public int getAvailableSize()
ListBuilder
getAvailableSize in interface ListBuilder<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||