public abstract class AbstractBatchingList extends AbstractList implements IBatchingList
modCount
Constructor and Description |
---|
AbstractBatchingList() |
Modifier and Type | Method and Description |
---|---|
protected void |
ensurePageLoaded(int index) |
Object |
get(int index) |
protected abstract Object |
getFromPage(int index)
Returns the index'th element from the current page.
|
protected abstract int |
getTotalCount()
Returns the total size of this list.
|
protected abstract void |
invalidatePage()
Invalidates the current page of objects, requiring a reload.
|
protected abstract boolean |
isPageLoaded()
Returns whether or not the current page has been loaded.
|
protected abstract void |
loadPage(int startingIndex,
int pageSize,
NSArray sortOrderings)
Loads one page into this list.
|
void |
setPageIndex(int pageIndex)
Sets the page number that is currently being viewed on this list.
|
void |
setPageSize(int pageSize)
Sets the page size of this list.
|
void |
setSortOrderings(NSArray sortOrderings)
Sets the sort orderings of this list.
|
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
protected abstract boolean isPageLoaded()
protected abstract void loadPage(int startingIndex, int pageSize, NSArray sortOrderings)
startingIndex
- the index of the first element of the page (in element units, not page units)pageSize
- the size of the page to loadsortOrderings
- the list of sort orderingsprotected abstract void invalidatePage()
protected abstract int getTotalCount()
protected abstract Object getFromPage(int index)
index
- the index of the element to returnprotected void ensurePageLoaded(int index)
public Object get(int index)
get
in interface List
get
in class AbstractList
public int size()
size
in interface Collection
size
in interface List
size
in class AbstractCollection
public void setPageIndex(int pageIndex)
IBatchingList
setPageIndex
in interface IBatchingList
pageIndex
- the page numberpublic void setPageSize(int pageSize)
IBatchingList
setPageSize
in interface IBatchingList
pageSize
- the page sizepublic void setSortOrderings(NSArray sortOrderings)
IBatchingList
setSortOrderings
in interface IBatchingList
sortOrderings
- the sort orderings arrayCopyright © 2002 – 2024 Project Wonder.