T - Element typepublic class CompositeList<T> extends AbstractList<T>
The list is read-only; attempts to call methods such as
AbstractList.add(Object) or AbstractList.set(int, Object) will throw.
Changes to the backing lists, including changes in length, will be reflected in this list.
This class is not thread-safe. Changes to backing lists will cause unspecified behavior.
modCount| Modifier and Type | Method and Description |
|---|---|
T |
get(int index) |
static <T> List<T> |
of()
Creates a CompositeList of zero lists.
|
static <T> CompositeList<T> |
of(List<? extends T>... lists)
Creates a CompositeList.
|
static <T> CompositeList<T> |
of(List<? extends T> list0,
List<? extends T> list1)
Creates a CompositeList of two lists.
|
static <T> CompositeList<T> |
of(List<? extends T> list0,
List<? extends T> list1,
List<? extends T> list2)
Creates a CompositeList of three lists.
|
static <T> List<T> |
of(List<T> list0)
Creates a CompositeList of one list.
|
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, toStringpublic static <T> CompositeList<T> of(List<? extends T>... lists)
T - Element typelists - Constituent listspublic static <T> List<T> of()
T - Element typepublic static <T> List<T> of(List<T> list0)
T - Element typelist0 - Listpublic static <T> CompositeList<T> of(List<? extends T> list0, List<? extends T> list1)
T - Element typelist0 - First listlist1 - Second listpublic static <T> CompositeList<T> of(List<? extends T> list0, List<? extends T> list1, List<? extends T> list2)
T - Element typelist0 - First listlist1 - Second listlist2 - Third listpublic T get(int index)
public int size()
size in interface Collection<T>size in interface List<T>size in class AbstractCollection<T>Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.