Package ghidra.util.database.spatial

# Interface Query<DS,NS>

All Known Implementing Classes:
  `AbstractHyperBoxQuery`, `AbstractRectangle2DQuery`, `DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery`, `TraceObjectValueQuery`

public interface Query<DS,NS>

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static enum`
  `Query.QueryInclusion`
  The result of testing a sub-tree for inclusion in a query

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Comparator<NS>`
  `getBoundsComparator()`
  If the query orders elements, get the (or an equivalent) comparator.
  `boolean`
  `terminateEarlyData(DS shape)`
  Test if internal data entry iteration can terminate early
  `boolean`
  `terminateEarlyNode(NS shape)`
  Test if internal node entry iteration can terminate early
  `boolean`
  `testData(DS shape)`
  Test if the given data shape is included in the query
  `Query.QueryInclusion`
  `testNode(NS shape)`
  Test if the given node shape has data entries included in the query

- ## Method Details

  - ### terminateEarlyData

    boolean terminateEarlyData(DS shape)
    Test if internal data entry iteration can terminate early
    Parameters:
      `shape` - the shape of the current data entry
    Returns:
      true if no entry to follow could possibly be included in the query

  - ### testData

    boolean testData(DS shape)
    Test if the given data shape is included in the query
    Parameters:
      `shape` - the shape of the data entry
    Returns:
      true if it is included

  - ### terminateEarlyNode

    boolean terminateEarlyNode(NS shape)
    Test if internal node entry iteration can terminate early
    Parameters:
      `shape` - the shape of the current node entry
    Returns:
      true if no entry to follow could possibly contain data entries included in the query

  - ### testNode

    Query.QueryInclusion testNode(NS shape)
    Test if the given node shape has data entries included in the query
    Parameters:
      `shape` - the shape (bounds) of the node entry
    Returns:
      a result as described in `Query.QueryInclusion`

  - ### getBoundsComparator

    Comparator<NS> getBoundsComparator()
    If the query orders elements, get the (or an equivalent) comparator.
    Returns:
      an comparator