public List<RelNode> getInputs() { return FlatLists.of(left, right); }
@Override public ConnectionFactory with(String property, Object value) { return new MapConnectionFactory( FlatLists.append(this.map, property, value.toString()), postProcessors); }
public FlatLists.ComparableList<E> current() { int i = 0; for (Object element : (Object[]) elements) { final List list2 = (List) element; Object[] a = list2.toArray(); System.arraycopy(a, 0, flatElements, i, a.length); i += a.length; } if (withOrdinality) { flatElements[i] = (E) Integer.valueOf(++ordinality); // 1-based } return FlatLists.ofComparable(list); } }
if (((Set) values).add(FlatLists.copyOf(columnValues)) && values.size() == sketchThreshold) {
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * <p>The elements need not be comparable, * and the returned list may not implement {@link Comparable}. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> copyOf(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient immutable list. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> of(T... t) { return flatList_(t, false); }
/** * Creates a memory-, CPU- and cache-efficient immutable list from an * existing list. The list is always copied. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> of(List<T> t) { return of_(t); }
if (((Set) values).add(FlatLists.copyOf(columnValues)) && values.size() == sketchThreshold) {
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * <p>The elements need not be comparable, * and the returned list may not implement {@link Comparable}. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> copyOf(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient immutable list. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> of(T... t) { return flatList_(t, false); }
/** * Creates a memory-, CPU- and cache-efficient immutable list from an * existing list. The list is always copied. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T> List<T> of(List<T> t) { return of_(t); }
public List<ImmutableIntList> keys() { return FlatLists.of(leftKeys, rightKeys); }
@SuppressWarnings("unchecked") @Test public void testFlatListN() { List<List<Object>> list = new ArrayList<>(); list.add(FlatLists.of()); list.add(FlatLists.<Object>copyOf()); list.add(FlatLists.of("A")); list.add(FlatLists.copyOf((Object) "A")); list.add(FlatLists.of("A", "B")); list.add(FlatLists.of((Object) "A", "B")); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.of("A", null)); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.of("A", "B", "C")); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.copyOf((Object) "A", "B", "C")); list.add(FlatLists.of("A", null, "C")); list.add(FlatLists.of("A", "B", "C", "D")); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.copyOf((Object) "A", "B", "C", "D")); list.add(FlatLists.of("A", null, "C", "D")); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.of("A", "B", "C", "D", "E")); list.add(Lists.newArrayList(Util.last(list))); list.add(FlatLists.copyOf((Object) "A", "B", "C", "D", "E")); list.add(FlatLists.of("A", null, "C", "D", "E")); list.add(FlatLists.of("A", "B", "C", "D", "E", "F")); list.add(FlatLists.copyOf((Object) "A", "B", "C", "D", "E", "F")); list.add(FlatLists.of("A", null, "C", "D", "E", "F")); list.add((List) FlatLists.of((Comparable) "A", "B", "C", "D", "E", "F", "G"));
public ConnectionFactory with(String property, Object value) { return new MapConnectionFactory( FlatLists.append(this.map, property, value.toString()), postProcessors); }
public FlatLists.ComparableList<E> current() { int i = 0; for (Object element : (Object[]) elements) { final List list2 = (List) element; Object[] a = list2.toArray(); System.arraycopy(a, 0, flatElements, i, a.length); i += a.length; } if (withOrdinality) { flatElements[i] = (E) Integer.valueOf(++ordinality); // 1-based } return FlatLists.ofComparable(list); } }
/** * Creates a memory-, CPU- and cache-efficient immutable list, * always copying the contents. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ @Deprecated // to be removed before 2.0 public static <T> List<T> copy(T... t) { return flatListNotComparable(t); }
/** * Creates a memory-, CPU- and cache-efficient comparable immutable list, * always copying the contents. * * <p>The elements are comparable, and so is the returned list. * Elements may be null. * * @param t Array of members of list * @param <T> Element type * @return List containing the given members */ public static <T extends Comparable> List<T> copyOf(T... t) { return flatList_(t, true); }
public static <T extends Comparable> ComparableList<T> ofComparable( List<T> t) { return of_(t); }