org.apache.lucene.spatial.prefix.tree

## 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 Summary

Fields
`protected Cell` `nextCell`
`protected Cell` `thisCell`

### Constructor Summary

Constructors
Constructor and Description
`CellIterator()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Cell` `next()`
`Cell` `nextFrom(Cell fromCell)` Gets the next cell that is >= `fromCell`, compared using non-leaf bytes.
`void` `remove()` This prevents sub-cells (those underneath the current cell) from being iterated to, if applicable, otherwise a NO-OP.
`Cell` `thisCell()` Returns the cell last returned from `next()`.

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining, hasNext`

### Field Detail

#### nextCell

    protected Cell nextCell

#### thisCell

    protected Cell thisCell

### Constructor Detail

#### CellIterator

    public CellIterator()

### Method Detail

#### 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>`