Package org.apache.lucene.spatial.prefix.tree

# Class QuadPrefixTree.QuadCell

java.lang.Object
org.apache.lucene.spatial.prefix.tree.LegacyCell
org.apache.lucene.spatial.prefix.tree.QuadPrefixTree.QuadCell

All Implemented Interfaces:
  `Cell`, `CellCanPrune`

Direct Known Subclasses:
  `PackedQuadPrefixTree.PackedQuadCell`

Enclosing class:
  `QuadPrefixTree`

protected class QuadPrefixTree.QuadCell extends LegacyCell
individual QuadPrefixTree grid cell

## Field Summary

### Fields inherited from class org.apache.lucene.spatial.prefix.tree.LegacyCell

`b_len, b_off, bytes, isLeaf, shape, shapeRel`

## Method Summary

Modifier and Type
Method
Description
`protected BytesRef`
`concat(BytesRef source, byte b)`
`protected QuadPrefixTree`
`getGrid()`
`protected int`
`getMaxLevels()`
`org.locationtech.spatial4j.shape.Shape`
`getShape()`
Gets the shape for this cell; typically a Rectangle.
`protected QuadPrefixTree.QuadCell`
`getSubCell(org.locationtech.spatial4j.shape.Point p)`
Performant implementations are expected to implement this efficiently by considering the current cell's boundary.
`protected Collection<Cell>`
`getSubCells()`
Gets the cells at the next grid cell level that covers this cell.
`int`
`getSubCellsSize()`
Returns the number of children for this cell.
`protected org.locationtech.spatial4j.shape.Rectangle`
`makeShape()`

### Methods inherited from class org.apache.lucene.spatial.prefix.tree.LegacyCell

`compare, compareToNoLeaf, equals, getLevel, getNextLevelCells, getShapeRel, getTokenBytesNoLeaf, getTokenBytesWithLeaf, hashCode, isLeaf, isPrefixOf, readCell, readLeafAdjust, setLeaf, setShapeRel, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Method Details

### getGrid

protected QuadPrefixTree getGrid()

Specified by:
  `getGrid` in class `LegacyCell`

### getMaxLevels

protected int getMaxLevels()

Specified by:
  `getMaxLevels` in class `LegacyCell`

### getSubCells

protected Collection<Cell> getSubCells()
Description copied from class: `LegacyCell`
Gets the cells at the next grid cell level that covers this cell. Precondition: Never called when getLevel() == maxLevel.

Specified by:
  `getSubCells` in class `LegacyCell`
Returns:
  A set of cells (no dups), sorted, modifiable, not empty, not null.

### concat

protected BytesRef concat(BytesRef source, byte b)

### getSubCellsSize

public int getSubCellsSize()
Description copied from interface: `CellCanPrune`
Returns the number of children for this cell.

Returns:
  the number of children.

### getSubCell

protected QuadPrefixTree.QuadCell getSubCell(org.locationtech.spatial4j.shape.Point p)
Description copied from class: `LegacyCell`
Performant implementations are expected to implement this efficiently by considering the current cell's boundary.

- Precondition: Never called when getLevel() == maxLevel.
- Precondition: this.getShape().relate(p) != DISJOINT.

Specified by:
  `getSubCell` in class `LegacyCell`

### getShape

public org.locationtech.spatial4j.shape.Shape getShape()
Description copied from interface: `Cell`
Gets the shape for this cell; typically a Rectangle.

### makeShape

protected org.locationtech.spatial4j.shape.Rectangle makeShape()