public class MultiPageList<T> extends PageableList<T>
| Constructor and Description |
|---|
MultiPageList(Function<Page,PageableList<T>> pageProvider)
To list all the pages, starting with the very first one.
|
MultiPageList(Page startPage,
Function<Page,PageableList<T>> pageProvider)
To list all the pages, starting with the startPage specified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
T element) |
boolean |
add(T item) |
boolean |
addAll(Collection<? extends T> c) |
boolean |
addAll(int index,
Collection<? extends T> c) |
void |
clear() |
List<T> |
collectAll()
Iterate over multiple pages and collect the results to list
|
boolean |
contains(Object o)
Whether current page contains the specified object.
|
boolean |
containsAll(Collection<?> c) |
T |
get(int index) |
Map<String,String> |
getLinks()
Returns map of links.
|
Page |
getNextPage()
Returns description of the next page.
|
Paging |
getPaging()
Returns description of the current collection page.
|
boolean |
hasNextPage()
Signals whether there are more subsequent pages or the last page has been reached
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<T> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<T> |
listIterator() |
ListIterator<T> |
listIterator(int index) |
T |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
T |
set(int index,
T element) |
int |
size()
Returns size of the items collection on a current page.
|
List<T> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
int |
totalSize()
Returns size of entire collection across all pages.
|
equals, hashCodeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitreplaceAll, sort, spliteratorparallelStream, removeIf, streampublic MultiPageList(Function<Page,PageableList<T>> pageProvider)
pageProvider - provider used to load the pagespublic MultiPageList(Page startPage, Function<Page,PageableList<T>> pageProvider)
startPage - page to start withpageProvider - provider used to load the pagespublic List<T> collectAll()
collectAll in class PageableList<T>public Page getNextPage()
getNextPage in class PageableList<T>nullpublic boolean hasNextPage()
hasNextPage in class PageableList<T>public Map<String,String> getLinks()
getLinks in class PageableList<T>nullpublic Paging getPaging()
getPaging in class PageableList<T>nullpublic int size()
totalSize() instead.size in interface Collection<T>size in interface List<T>size in class PageableList<T>public int totalSize()
public boolean isEmpty()
isEmpty in interface Collection<T>isEmpty in interface List<T>isEmpty in class PageableList<T>public boolean contains(Object o)
stream().anyMatch(o) instead.contains in interface Collection<T>contains in interface List<T>contains in class PageableList<T>public Object[] toArray()
toArray in interface Collection<T>toArray in interface List<T>toArray in class PageableList<T>public <T> T[] toArray(T[] a)
toArray in interface Collection<T>toArray in interface List<T>toArray in class PageableList<T>public boolean add(T item)
add in interface Collection<T>add in interface List<T>add in class PageableList<T>public boolean remove(Object o)
remove in interface Collection<T>remove in interface List<T>remove in class PageableList<T>public boolean containsAll(Collection<?> c)
containsAll in interface Collection<T>containsAll in interface List<T>containsAll in class PageableList<T>public boolean addAll(Collection<? extends T> c)
addAll in interface Collection<T>addAll in interface List<T>addAll in class PageableList<T>public boolean addAll(int index,
Collection<? extends T> c)
public boolean removeAll(Collection<?> c)
removeAll in interface Collection<T>removeAll in interface List<T>removeAll in class PageableList<T>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<T>retainAll in interface List<T>retainAll in class PageableList<T>public void clear()
clear in interface Collection<T>clear in interface List<T>clear in class PageableList<T>public T get(int index)
public void add(int index,
T element)
public T remove(int index)
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf in interface List<T>lastIndexOf in class PageableList<T>public ListIterator<T> listIterator()
listIterator in interface List<T>listIterator in class PageableList<T>public ListIterator<T> listIterator(int index)
listIterator in interface List<T>listIterator in class PageableList<T>Copyright © 2017. All rights reserved.