T - public class ConcatenatedList<T> extends AbstractList<T>
List view built on top of a list of underlying lists.
Useful for combining multiple lists without the memory overhead of actually
creating new storage for all the elements.
Be aware that if you change the underlying lists, then those changes will be reflected in this list.
modCount| Constructor and Description |
|---|
ConcatenatedList(List<List<T>> lists)
Construct with the given list of lists.
|
ConcatenatedList(List<T> l1,
List<T> l2)
Construct with the given lists.
|
ConcatenatedList(List<T> l1,
List<T> l2,
List<T> l3)
Construct with the given lists.
|
ConcatenatedList(List<T> l1,
List<T> l2,
List<T> l3,
List<T> l4)
Construct with the given lists.
|
| Modifier and Type | Method and Description |
|---|---|
T |
get(int index) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic ConcatenatedList(List<List<T>> lists)
lists - the listspublic ConcatenatedList(List<T> l1, List<T> l2)
l1 - first listl2 - second listpublic ConcatenatedList(List<T> l1, List<T> l2, List<T> l3)
l1 - first listl2 - second listl3 - third list