E
- the element type.public abstract class PagedList<E> extends Object implements List<E>
Constructor and Description |
---|
PagedList()
Creates an instance of Pagedlist.
|
PagedList(Page<E> page)
Creates an instance of PagedList from a
Page response. |
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e) |
void |
add(int index,
E element) |
boolean |
addAll(Collection<? extends E> c) |
boolean |
addAll(int index,
Collection<? extends E> c) |
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
Page<E> |
currentPage()
Gets the latest page fetched.
|
E |
get(int index) |
boolean |
hasNextPage()
If there are more pages available.
|
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
void |
loadAll()
Keep loading the next page from the next page link until all items are loaded.
|
void |
loadNextPage()
Loads a page from next page link.
|
abstract Page<E> |
nextPage(String nextPageLink)
Override this method to load the next page of items from a next page link.
|
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
protected void |
setCurrentPage(Page<E> currentPage)
Sets the current page.
|
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
equals, hashCode, replaceAll, sort, spliterator
parallelStream, removeIf, stream
public abstract Page<E> nextPage(String nextPageLink) throws RestException, IOException
nextPageLink
- the link to get the next page of items.Page
object storing a page of items and a link to the next page.RestException
- thrown if an error is raised from Azure.IOException
- thrown if there's any failure in deserialization.public boolean hasNextPage()
public void loadNextPage()
public void loadAll()
protected void setCurrentPage(Page<E> currentPage)
currentPage
- the current page.public int size()
public boolean isEmpty()
public boolean contains(Object o)
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
containsAll
in interface List<E>
public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index, Collection<? extends E> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
public int lastIndexOf(Object o)
lastIndexOf
in interface List<E>
public ListIterator<E> listIterator()
listIterator
in interface List<E>
public ListIterator<E> listIterator(int index)
listIterator
in interface List<E>
Copyright © 2019. All rights reserved.