Tabnine Logo
SpatialKey.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
org.h2.mvstore.rtree.SpatialKey

Best Java code snippets using org.h2.mvstore.rtree.SpatialKey.getId (Showing top 19 results out of 315)

origin: com.h2database/h2

/**
 * Check whether two spatial values are equal.
 *
 * @param a the first value
 * @param b the second value
 * @return true if they are equal
 */
public boolean equals(Object a, Object b) {
  if (a == b) {
    return true;
  } else if (a == null || b == null) {
    return false;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la == lb;
}
origin: com.h2database/h2

@Override
public int compare(Object a, Object b) {
  if (a == b) {
    return 0;
  } else if (a == null) {
    return -1;
  } else if (b == null) {
    return 1;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return Long.compare(la, lb);
}
origin: com.h2database/h2

@Override
public Row get() {
  return table.getRow(session, current.getId());
}
origin: com.h2database/h2

/**
 * Get the row with the given index key.
 *
 * @param key the index key
 * @return the row
 */
SearchRow getRow(SpatialKey key) {
  SearchRow searchRow = mvTable.getTemplateRow();
  searchRow.setKey(key.getId());
  return searchRow;
}
origin: com.h2database/h2

@Override
public void write(WriteBuffer buff, Object obj) {
  SpatialKey k = (SpatialKey) obj;
  if (k.isNull()) {
    buff.putVarInt(-1);
    buff.putVarLong(k.getId());
    return;
  }
  int flags = 0;
  for (int i = 0; i < dimensions; i++) {
    if (k.min(i) == k.max(i)) {
      flags |= 1 << i;
    }
  }
  buff.putVarInt(flags);
  for (int i = 0; i < dimensions; i++) {
    buff.putFloat(k.min(i));
    if ((flags & (1 << i)) == 0) {
      buff.putFloat(k.max(i));
    }
  }
  buff.putVarLong(k.getId());
}
origin: com.eventsourcing/h2

@Override
public int compare(Object a, Object b) {
  if (a == b) {
    return 0;
  } else if (a == null) {
    return -1;
  } else if (b == null) {
    return 1;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la < lb ? -1 : la > lb ? 1 : 0;
}
origin: org.wowtools/h2

@Override
public int compare(Object a, Object b) {
  if (a == b) {
    return 0;
  } else if (a == null) {
    return -1;
  } else if (b == null) {
    return 1;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la < lb ? -1 : la > lb ? 1 : 0;
}
origin: com.h2database/h2-mvstore

/**
 * Check whether two spatial values are equal.
 *
 * @param a the first value
 * @param b the second value
 * @return true if they are equal
 */
public boolean equals(Object a, Object b) {
  if (a == b) {
    return true;
  } else if (a == null || b == null) {
    return false;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la == lb;
}
origin: org.wowtools/h2

/**
 * Check whether two spatial values are equal.
 *
 * @param a the first value
 * @param b the second value
 * @return true if they are equal
 */
public boolean equals(Object a, Object b) {
  if (a == b) {
    return true;
  } else if (a == null || b == null) {
    return false;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la == lb;
}
origin: com.eventsourcing/h2

/**
 * Check whether two spatial values are equal.
 *
 * @param a the first value
 * @param b the second value
 * @return true if they are equal
 */
public boolean equals(Object a, Object b) {
  if (a == b) {
    return true;
  } else if (a == null || b == null) {
    return false;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return la == lb;
}
origin: com.h2database/h2-mvstore

@Override
public int compare(Object a, Object b) {
  if (a == b) {
    return 0;
  } else if (a == null) {
    return -1;
  } else if (b == null) {
    return 1;
  }
  long la = ((SpatialKey) a).getId();
  long lb = ((SpatialKey) b).getId();
  return Long.compare(la, lb);
}
origin: org.wowtools/h2

@Override
public Row get() {
  return table.getRow(session, current.getId());
}
origin: com.eventsourcing/h2

@Override
public Row get() {
  return table.getRow(session, current.getId());
}
origin: org.gridgain/gridgain-indexing

/**
 * @param i Spatial key iterator.
 * @return Iterator over rows.
 */
private Iterator<GridH2Row> rowIterator(Iterator<SpatialKey> i) {
  if (!i.hasNext())
    return Collections.emptyIterator();
  List<GridH2Row> rows = new ArrayList<>();
  do {
    GridH2Row row = idToRow.get(i.next().getId());
    assert row != null;
    rows.add(row);
  }
  while (i.hasNext());
  return filter(rows.iterator());
}
origin: org.wowtools/h2

/**
 * Get the row with the given index key.
 *
 * @param key the index key
 * @return the row
 */
SearchRow getRow(SpatialKey key) {
  SearchRow searchRow = mvTable.getTemplateRow();
  searchRow.setKey(key.getId());
  return searchRow;
}
origin: com.eventsourcing/h2

/**
 * Get the row with the given index key.
 *
 * @param key the index key
 * @return the row
 */
SearchRow getRow(SpatialKey key) {
  SearchRow searchRow = mvTable.getTemplateRow();
  searchRow.setKey(key.getId());
  return searchRow;
}
origin: com.h2database/h2-mvstore

@Override
public void write(WriteBuffer buff, Object obj) {
  SpatialKey k = (SpatialKey) obj;
  if (k.isNull()) {
    buff.putVarInt(-1);
    buff.putVarLong(k.getId());
    return;
  }
  int flags = 0;
  for (int i = 0; i < dimensions; i++) {
    if (k.min(i) == k.max(i)) {
      flags |= 1 << i;
    }
  }
  buff.putVarInt(flags);
  for (int i = 0; i < dimensions; i++) {
    buff.putFloat(k.min(i));
    if ((flags & (1 << i)) == 0) {
      buff.putFloat(k.max(i));
    }
  }
  buff.putVarLong(k.getId());
}
origin: com.eventsourcing/h2

@Override
public void write(WriteBuffer buff, Object obj) {
  SpatialKey k = (SpatialKey) obj;
  if (k.isNull()) {
    buff.putVarInt(-1);
    buff.putVarLong(k.getId());
    return;
  }
  int flags = 0;
  for (int i = 0; i < dimensions; i++) {
    if (k.min(i) == k.max(i)) {
      flags |= 1 << i;
    }
  }
  buff.putVarInt(flags);
  for (int i = 0; i < dimensions; i++) {
    buff.putFloat(k.min(i));
    if ((flags & (1 << i)) == 0) {
      buff.putFloat(k.max(i));
    }
  }
  buff.putVarLong(k.getId());
}
origin: org.wowtools/h2

@Override
public void write(WriteBuffer buff, Object obj) {
  SpatialKey k = (SpatialKey) obj;
  if (k.isNull()) {
    buff.putVarInt(-1);
    buff.putVarLong(k.getId());
    return;
  }
  int flags = 0;
  for (int i = 0; i < dimensions; i++) {
    if (k.min(i) == k.max(i)) {
      flags |= 1 << i;
    }
  }
  buff.putVarInt(flags);
  for (int i = 0; i < dimensions; i++) {
    buff.putFloat(k.min(i));
    if ((flags & (1 << i)) == 0) {
      buff.putFloat(k.max(i));
    }
  }
  buff.putVarLong(k.getId());
}
org.h2.mvstore.rtreeSpatialKeygetId

Popular methods of SpatialKey

  • <init>
    Create a new key.
  • equalsIgnoringId
    Check whether two objects are equals, but do not compare the id fields.
  • isNull
  • max
    Get the maximum value for the given dimension.
  • min
    Get the minimum value for the given dimension.
  • setMax
    Set the maximum value for the given dimension.
  • setMin
    Set the minimum value for the given dimension.
  • toString

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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