E - The type of the listpublic class PageableList<E> extends Object implements List<E>
| Constructor and Description |
|---|
PageableList(Collection<E> myCollection)
Create a list wrapping the given list
|
PageableList(List<E> myList)
Create a list wrapping the given list
|
| 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) |
protected <T> PageableList<T> |
createEmptyList(Class<T> typeClass)
create a new empty list of the same type
|
<T> PageableList<T> |
createEmptyListWithMetaData(Class<T> typeClass) |
static <T> PageableList<T> |
emptyList()
Get an empty, unmodifiable empty list
|
E |
get(int index) |
int |
getMinNumberOfAdditionalElements() |
int |
getMinNumberOfElements() |
int |
getOffset() |
int |
indexOf(Object o) |
boolean |
isEmpty() |
Iterator<E> |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator<E> |
listIterator() |
ListIterator<E> |
listIterator(int index) |
E |
remove(int index) |
boolean |
remove(Object o) |
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
E |
set(int index,
E element) |
void |
setMinNumberOfElements(int minNumberOfElements) |
void |
setOffset(int offset) |
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, waitequals, hashCode, replaceAll, sort, spliteratorparallelStream, removeIf, streampublic PageableList(Collection<E> myCollection)
myCollection - the actual list to wrappublic static <T> PageableList<T> emptyList()
T - the type (does not matter since list is empty)public boolean add(E e)
public boolean addAll(Collection<? extends E> c)
public boolean addAll(int index,
Collection<? extends E> c)
public void clear()
public boolean contains(Object o)
public boolean containsAll(Collection<?> c)
containsAll in interface Collection<E>containsAll in interface List<E>protected <T> PageableList<T> createEmptyList(Class<T> typeClass)
T - type of the resulting classtypeClass - the class of the resulting classpublic <T> PageableList<T> createEmptyListWithMetaData(Class<T> typeClass)
T - type of the resulting classtypeClass - the class of the resulting classpublic int getMinNumberOfAdditionalElements()
getMinNumberOfElements(), the actual size
of this result range (size()) and of course the offset of the range (
getOffset()).public int getMinNumberOfElements()
setMinNumberOfElements(int)public int getOffset()
public boolean isEmpty()
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>public boolean remove(Object o)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void setMinNumberOfElements(int minNumberOfElements)
minNumberOfElements - the number of elements which are at least contained in the full result. This does
not have to be the overall size. So for instance when doing a query one can define
to retrieve only the first n matches but also to check if there are m additional
hits. When the query completes you would add the n matches to the list and set
this value to n + the actual number of additional results found. This number could
be m or a smaller value. In the latter case minNumberOfElements would hold the
overall size.public void setOffset(int offset)
offset - the offset to setpublic int size()
public Object[] toArray()
Copyright © 2019 Communote team. All rights reserved.