Class CellIterator

java.lang.Object
org.apache.lucene.spatial.prefix.tree.CellIterator
All Implemented Interfaces:
Iterator<Cell>
Direct Known Subclasses:
NumberRangePrefixTree.NRCell, PackedQuadPrefixTree.PrefixTreeIterator

public abstract class CellIterator extends Object implements Iterator<Cell>
An Iterator of SpatialPrefixTree Cells. The order is always sorted without duplicates.
WARNING: This API is experimental and might change in incompatible ways in the next release.
  • Field Details

    • nextCell

      protected Cell nextCell
    • thisCell

      protected Cell thisCell
  • Constructor Details

    • CellIterator

      public CellIterator()
  • Method Details

    • thisCell

      public Cell thisCell()
      Returns the cell last returned from next(). It's cleared by hasNext().
    • nextFrom

      public Cell nextFrom(Cell fromCell)
      Gets the next cell that is >= fromCell, compared using non-leaf bytes. If it returns null then the iterator is exhausted.
    • remove

      public void remove()
      This prevents sub-cells (those underneath the current cell) from being iterated to, if applicable, otherwise a NO-OP.
      Specified by:
      remove in interface Iterator<Cell>
    • next

      public Cell next()
      Specified by:
      next in interface Iterator<Cell>