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

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

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

origin: org.apache.calcite/calcite-core

      null));
for (FlatLists.ComparableList value : this.values) {
 for (int i = 0; i < value.size(); i++) {
  Comparable c = (Comparable) value.get(i);
  list.set(columnOrdinals[i], c);
origin: Qihoo360/Quicksql

      null));
for (FlatLists.ComparableList value : this.values) {
 for (int i = 0; i < value.size(); i++) {
  Comparable c = (Comparable) value.get(i);
  list.set(columnOrdinals[i], c);
origin: Qihoo360/Quicksql

@Test public void testFlatListProduct() {
 final List<Enumerator<List<String>>> list = new ArrayList<>();
 list.add(Linq4j.enumerator(l2(l1("a"), l1("b"))));
 list.add(Linq4j.enumerator(l3(l2("x", "p"), l2("y", "q"), l2("z", "r"))));
 final Enumerable<FlatLists.ComparableList<String>> product =
   SqlFunctions.product(list, 3, false);
 int n = 0;
 FlatLists.ComparableList<String> previous = FlatLists.of();
 for (FlatLists.ComparableList<String> strings : product) {
  if (n++ == 1) {
   assertThat(strings.size(), is(3));
   assertThat(strings.get(0), is("a"));
   assertThat(strings.get(1), is("y"));
   assertThat(strings.get(2), is("q"));
  }
  if (previous != null) {
   assertTrue(previous.compareTo(strings) < 0);
  }
  previous = strings;
 }
 assertThat(n, is(6));
}
origin: org.apache.calcite/calcite-core

@Test public void testFlatListProduct() {
 final List<Enumerator<List<String>>> list = new ArrayList<>();
 list.add(Linq4j.enumerator(l2(l1("a"), l1("b"))));
 list.add(Linq4j.enumerator(l3(l2("x", "p"), l2("y", "q"), l2("z", "r"))));
 final Enumerable<FlatLists.ComparableList<String>> product =
   SqlFunctions.product(list, 3, false);
 int n = 0;
 FlatLists.ComparableList<String> previous = FlatLists.of();
 for (FlatLists.ComparableList<String> strings : product) {
  if (n++ == 1) {
   assertThat(strings.size(), is(3));
   assertThat(strings.get(0), is("a"));
   assertThat(strings.get(1), is("y"));
   assertThat(strings.get(2), is("q"));
  }
  if (previous != null) {
   assertTrue(previous.compareTo(strings) < 0);
  }
  previous = strings;
 }
 assertThat(n, is(6));
}
org.apache.calcite.runtimeFlatLists$ComparableList

Javadoc

List that is also comparable.

You can create an instance whose type parameter T does not extend Comparable, but you will get a ClassCastException at runtime when you call #compareTo(Object) if the elements of the list do not implement Comparable.

Most used methods

  • get
  • size
  • compareTo

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • getResourceAsStream (ClassLoader)
  • Menu (java.awt)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • From CI to AI: The AI layer in your organization
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