congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
FlatLists
Code IndexAdd Tabnine to your IDE (free)

How to use
FlatLists
in
org.apache.calcite.runtime

Best Java code snippets using org.apache.calcite.runtime.FlatLists (Showing top 20 results out of 315)

origin: Qihoo360/Quicksql

public List<RelNode> getInputs() {
 return FlatLists.of(left, right);
}
origin: Qihoo360/Quicksql

@Override
public ConnectionFactory with(String property, Object value) {
  return new MapConnectionFactory(
    FlatLists.append(this.map, property, value.toString()), postProcessors);
}
origin: Qihoo360/Quicksql

 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);
 }
}
origin: org.apache.calcite/calcite-core

if (args == null) {
 args1 = new Object[]{rel, mq};
 key1 = FlatLists.of(rel, method);
} else {
 args1 = new Object[args.length + 2];
 key1 = FlatLists.copyOf(args2);
origin: Qihoo360/Quicksql

if (((Set) values).add(FlatLists.copyOf(columnValues))
  && values.size() == sketchThreshold) {
origin: org.apache.calcite/calcite-core

/**
 * 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);
}
origin: Qihoo360/Quicksql

/**
 * 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);
}
origin: org.apache.calcite/calcite-core

/**
 * 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);
}
origin: Qihoo360/Quicksql

if (args == null) {
 args1 = new Object[]{rel, mq};
 key1 = FlatLists.of(rel, method);
} else {
 args1 = new Object[args.length + 2];
 key1 = FlatLists.copyOf(args2);
origin: org.apache.calcite/calcite-core

if (((Set) values).add(FlatLists.copyOf(columnValues))
  && values.size() == sketchThreshold) {
origin: Qihoo360/Quicksql

/**
 * 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);
}
origin: org.apache.calcite/calcite-core

/**
 * 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);
}
origin: Qihoo360/Quicksql

/**
 * 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);
}
origin: org.apache.calcite/calcite-core

public List<ImmutableIntList> keys() {
 return FlatLists.of(leftKeys, rightKeys);
}
origin: Qihoo360/Quicksql

@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"));
origin: org.apache.calcite/calcite-core

public ConnectionFactory with(String property, Object value) {
 return new MapConnectionFactory(
   FlatLists.append(this.map, property, value.toString()),
   postProcessors);
}
origin: org.apache.calcite/calcite-core

 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);
 }
}
origin: org.apache.calcite/calcite-core

/**
 * 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);
}
origin: Qihoo360/Quicksql

/**
 * 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);
}
origin: Qihoo360/Quicksql

public static <T extends Comparable> ComparableList<T> ofComparable(
  List<T> t) {
 return of_(t);
}
org.apache.calcite.runtimeFlatLists

Javadoc

Space-efficient, comparable, immutable lists.

Most used methods

  • of
    Creates a memory-, CPU- and cache-efficient immutable list.
  • copyOf
    Creates a memory-, CPU- and cache-efficient immutable list, always copying the contents.The elements
  • append
    Returns a map that consists of a given map plus an (key, value), guaranteed to be an ImmutableMap.
  • ofComparable
  • flatListNotComparable
    Creates a memory-, CPU- and cache-efficient immutable list, always copying the list.
  • flatList_
    Creates a memory-, CPU- and cache-efficient comparable immutable list, optionally copying the list.
  • of_

Popular in Java

  • Reading from database using SQL prepared statement
  • onRequestPermissionsResult (Fragment)
  • runOnUiThread (Activity)
  • setRequestProperty (URLConnection)
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JTable (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now