Package org.apache.calcite.util
Class CompositeList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.apache.calcite.util.CompositeList<T>
- Type Parameters:
- T- Element type
- All Implemented Interfaces:
- Iterable<T>,- Collection<T>,- List<T>
Read-only list that is the concatenation of sub-lists.
 
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.
- 
Field SummaryFields inherited from class java.util.AbstractListmodCount
- 
Method SummaryModifier and TypeMethodDescriptionget(int index) static <T> List<T>of()Creates a CompositeList of zero lists.static <T> CompositeList<T>Creates a CompositeList.static <T> CompositeList<T>Creates a CompositeList of two lists.static <T> CompositeList<T>Creates a CompositeList of three lists.static <T> List<T>Creates a CompositeList of one list.static <T> CompositeList<T>Creates a CompositeList.intsize()Methods inherited from class java.util.AbstractListadd, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollectionaddAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.CollectionparallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.ListaddAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
- 
Method Details- 
ofCreates a CompositeList.- Type Parameters:
- T- Element type
- Parameters:
- lists- Constituent lists
- Returns:
- List consisting of all lists
 
- 
ofCopyCreates a CompositeList.- Type Parameters:
- T- Element type
- Parameters:
- lists- Constituent lists
- Returns:
- List consisting of all lists
 
- 
ofCreates a CompositeList of zero lists.- Type Parameters:
- T- Element type
- Returns:
- List consisting of all lists
 
- 
ofCreates a CompositeList of one list.- Type Parameters:
- T- Element type
- Parameters:
- list0- List
- Returns:
- List consisting of all lists
 
- 
ofCreates a CompositeList of two lists.- Type Parameters:
- T- Element type
- Parameters:
- list0- First list
- list1- Second list
- Returns:
- List consisting of all lists
 
- 
ofpublic static <T> CompositeList<T> of(List<? extends T> list0, List<? extends T> list1, List<? extends T> list2) Creates a CompositeList of three lists.- Type Parameters:
- T- Element type
- Parameters:
- list0- First list
- list1- Second list
- list2- Third list
- Returns:
- List consisting of all lists
 
- 
get
- 
sizepublic int size()- Specified by:
- sizein interface- Collection<T>
- Specified by:
- sizein interface- List<T>
- Specified by:
- sizein class- AbstractCollection<T>
 
 
-