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

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

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

origin: Qihoo360/Quicksql

private static int compare_(Object o0, Object o1) {
 if (o0 instanceof Comparable) {
  return compare((Comparable) o0, (Comparable) o1);
 }
 return compare((List) o0, (List) o1);
}
origin: org.apache.drill.exec/drill-java-exec

@Override
public int hashCode() {
 return Utilities.hashCode(rowCount) + Utilities.hashCode(cpu)
   + Utilities.hashCode(io) + Utilities.hashCode(network);
}
origin: Qihoo360/Quicksql

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 return h;
}
origin: Qihoo360/Quicksql

public static int compare(List v0, List v1) {
 //noinspection unchecked
 final Iterator iterator0 = v0.iterator();
 final Iterator iterator1 = v1.iterator();
 for (;;) {
  if (!iterator0.hasNext()) {
   return !iterator1.hasNext()
     ? 0
     : -1;
  }
  if (!iterator1.hasNext()) {
   return 1;
  }
  final Object o0 = iterator0.next();
  final Object o1 = iterator1.next();
  int c = compare_(o0, o1);
  if (c != 0) {
   return c;
  }
 }
}
origin: org.apache.calcite/calcite-core

public static int compare(List v0, List v1) {
 //noinspection unchecked
 final Iterator iterator0 = v0.iterator();
 final Iterator iterator1 = v1.iterator();
 for (;;) {
  if (!iterator0.hasNext()) {
   return !iterator1.hasNext()
     ? 0
     : -1;
  }
  if (!iterator1.hasNext()) {
   return 1;
  }
  final Object o0 = iterator0.next();
  final Object o1 = iterator1.next();
  int c = compare_(o0, o1);
  if (c != 0) {
   return c;
  }
 }
}
origin: org.apache.calcite/calcite-core

private static int compare_(Object o0, Object o1) {
 if (o0 instanceof Comparable) {
  return compare((Comparable) o0, (Comparable) o1);
 }
 return compare((List) o0, (List) o1);
}
origin: Qihoo360/Quicksql

public static int hash(int h, boolean v) {
 return h * 31 + hashCode(v);
}
origin: org.apache.calcite/calcite-core

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 h = h * 31 + Utilities.hash(t1);
 return h;
}
origin: qubole/quark

 public int compareTo(Column column) {
  return Utilities.compare(ordinal, column.ordinal);
 }
}
origin: org.apache.calcite/calcite-core

public static int hash(int h, boolean v) {
 return h * 31 + hashCode(v);
}
origin: org.apache.calcite/calcite-core

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 h = h * 31 + Utilities.hash(t1);
 h = h * 31 + Utilities.hash(t2);
 h = h * 31 + Utilities.hash(t3);
 h = h * 31 + Utilities.hash(t4);
 return h;
}
origin: org.apache.calcite/calcite-core

public int compareTo(Column column) {
 return Utilities.compare(ordinal, column.ordinal);
}
origin: org.apache.calcite/calcite-core

@SuppressWarnings("deprecation")
public void checkHash(double v) {
 assertThat(Double.valueOf(v).hashCode(), is(Utilities.hashCode(v)));
 final long long_ = (long) v;
 assertThat(Long.valueOf(long_).hashCode(), is(Utilities.hashCode(long_)));
 final float float_ = (float) v;
 assertThat(Float.valueOf(float_).hashCode(),
   is(Utilities.hashCode(float_)));
 final boolean boolean_ = v != 0;
 assertThat(Boolean.valueOf(boolean_).hashCode(),
   is(Utilities.hashCode(boolean_)));
}
origin: Qihoo360/Quicksql

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 h = h * 31 + Utilities.hash(t1);
 h = h * 31 + Utilities.hash(t2);
 h = h * 31 + Utilities.hash(t3);
 h = h * 31 + Utilities.hash(t4);
 return h;
}
origin: qubole/quark

public int compareTo(Dimension dimension) {
 return Utilities.compare(this.cubeOrdinal, dimension.cubeOrdinal);
}
origin: Qihoo360/Quicksql

@SuppressWarnings("deprecation")
public void checkHash(double v) {
 assertThat(Double.valueOf(v).hashCode(), is(Utilities.hashCode(v)));
 final long long_ = (long) v;
 assertThat(Long.valueOf(long_).hashCode(), is(Utilities.hashCode(long_)));
 final float float_ = (float) v;
 assertThat(Float.valueOf(float_).hashCode(),
   is(Utilities.hashCode(float_)));
 final boolean boolean_ = v != 0;
 assertThat(Boolean.valueOf(boolean_).hashCode(),
   is(Utilities.hashCode(boolean_)));
}
origin: org.apache.calcite/calcite-core

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 h = h * 31 + Utilities.hash(t1);
 h = h * 31 + Utilities.hash(t2);
 h = h * 31 + Utilities.hash(t3);
 return h;
}
origin: Qihoo360/Quicksql

public int compareTo(Column column) {
 return Utilities.compare(ordinal, column.ordinal);
}
origin: org.apache.calcite/calcite-core

public int hashCode() {
 int h = 1;
 h = h * 31 + Utilities.hash(t0);
 h = h * 31 + Utilities.hash(t1);
 h = h * 31 + Utilities.hash(t2);
 h = h * 31 + Utilities.hash(t3);
 h = h * 31 + Utilities.hash(t4);
 h = h * 31 + Utilities.hash(t5);
 return h;
}
origin: Qihoo360/Quicksql

/** Compares arrays of {@link RelNode}. */
public static int compareRels(RelNode[] rels0, RelNode[] rels1) {
 int c = Utilities.compare(rels0.length, rels1.length);
 if (c != 0) {
  return c;
 }
 for (int i = 0; i < rels0.length; i++) {
  c = COMPARATOR.compare(rels0[i], rels1[i]);
  if (c != 0) {
   return c;
  }
 }
 return 0;
}
org.apache.calcite.runtimeUtilities

Javadoc

Utility methods called by generated code.

Most used methods

  • compare
  • hashCode
    Computes the hash code of a boolean value. Equivalent to Boolean .hashCode(boolean), but that method
  • compare_
  • hash

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JOptionPane (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top PhpStorm plugins
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