public class PartialList<E> extends AbstractList<E>
Modifier and Type | Field and Description |
---|---|
protected List<E> |
list |
protected long |
totalSize |
modCount
Constructor and Description |
---|
PartialList(List<E> list,
long totalSize)
Constructs a partial list.
|
Modifier and Type | Method and Description |
---|---|
E |
get(int index) |
int |
size() |
void |
sort(Comparator<? super E> c) |
PartialList<E> |
subList(int fromIndex,
int toIndex) |
long |
totalSize()
Returns the total size of the bigger list this is a part of.
|
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
parallelStream, removeIf, stream
public PartialList(List<E> list, long totalSize)
list
- the listtotalSize
- the total sizepublic int size()
size
in interface Collection<E>
size
in interface List<E>
size
in class AbstractCollection<E>
public void sort(Comparator<? super E> c)
public PartialList<E> subList(int fromIndex, int toIndex)
public long totalSize()
Copyright © 2018 Nuxeo. All rights reserved.