public class DocumentModelListImpl extends ArrayList<DocumentModel> implements DocumentModelList
Modifier and Type | Field and Description |
---|---|
protected long |
totalSize |
modCount
Constructor and Description |
---|
DocumentModelListImpl() |
DocumentModelListImpl(int size) |
DocumentModelListImpl(List<DocumentModel> list) |
DocumentModelListImpl(List<DocumentModel> list,
long totalSize)
Constructs a DocumentModelListImpl and sets the "total size" information.
|
Modifier and Type | Method and Description |
---|---|
void |
setTotalSize(long totalSize) |
long |
totalSize()
Returns the total size of the bigger list this is a part of.
|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, forEach, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
equals, hashCode
containsAll, toString
finalize, getClass, notify, notifyAll, wait, wait, wait
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
parallelStream, removeIf, stream
protected long totalSize
public DocumentModelListImpl()
public DocumentModelListImpl(int size)
public DocumentModelListImpl(List<DocumentModel> list)
public DocumentModelListImpl(List<DocumentModel> list, long totalSize)
The total size is additional information that can be provided in some cases where the list returned is a slice of a bigger list, this is used when getting paged results from a database for instance.
list
- the list of documentstotalSize
- the total size, with -1 meaning "same as the list's size"public void setTotalSize(long totalSize)
public long totalSize()
DocumentModelList
totalSize
in interface DocumentModelList
Copyright © 2018 Nuxeo. All rights reserved.