Class FlatLists.Flat2List<T>

java.lang.Object
org.apache.calcite.runtime.FlatLists.AbstractFlatList<T>
org.apache.calcite.runtime.FlatLists.Flat2List<T>
Type Parameters:
T - Element type
All Implemented Interfaces:
Comparable<List>, Iterable<T>, Collection<T>, List<T>, RandomAccess, FlatLists.ComparableList<T>
Enclosing class:
FlatLists

protected static class FlatLists.Flat2List<T> extends FlatLists.AbstractFlatList<T> implements FlatLists.ComparableList<T>
List that stores its two elements in the two members of the class. Unlike ArrayList or Arrays.asList(Object[]) there is no array, only one piece of memory allocated, therefore is very compact and cache and CPU efficient.

The list is read-only and cannot be modified or re-sized. The elements may be null.

The list is created via FlatLists.of().