Package org.nuxeo.ecm.core.api
Class PartialList<E>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- org.nuxeo.ecm.core.api.PartialList<E>
-
- All Implemented Interfaces:
Iterable<E>
,Collection<E>
,List<E>
public class PartialList<E> extends AbstractList<E>
The bundling of a list and a total size.
-
-
Constructor Summary
Constructors Constructor Description PartialList(List<E> list, long totalSize)
Constructs a partial list.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
get
public E get(int index)
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceList<E>
- Specified by:
size
in classAbstractCollection<E>
-
sort
public void sort(Comparator<? super E> c)
-
subList
public PartialList<E> subList(int fromIndex, int toIndex)
-
totalSize
public long totalSize()
Returns the total size of the bigger list this is a part of.- Since:
- 9.3
-
-