PrefixTreeFacetCounter.FacetVisitor (Lucene 10.5.0 spatial-extras API)
Description: declaration: package: org.apache.lucene.spatial.prefix, class: PrefixTreeFacetCounter, class: FacetVisitor

Package org.apache.lucene.spatial.prefix

# Class PrefixTreeFacetCounter.FacetVisitor

java.lang.Object
org.apache.lucene.spatial.prefix.PrefixTreeFacetCounter.FacetVisitor

Enclosing class:
  `PrefixTreeFacetCounter`

public abstract static class PrefixTreeFacetCounter.FacetVisitor extends Object
A callback/visitor of facet counts.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FacetVisitor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `startOfSegment()`
  Called at the start of the segment, if there is indexed data.
  `abstract void`
  `visit(Cell cell, int count)`
  Called for cells with a leaf, or cells at the target facet level.

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

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

- ## Constructor Details

  - ### FacetVisitor

    public FacetVisitor()

- ## Method Details

  - ### startOfSegment

    public void startOfSegment()
    Called at the start of the segment, if there is indexed data.

  - ### visit

    public abstract void visit(Cell cell, int count)
    Called for cells with a leaf, or cells at the target facet level. `count` is greater than zero. When an ancestor cell is given with non-zero count, the count can be considered to be added to all cells below. You won't necessarily get a cell at level `facetLevel` if the indexed data is courser (bigger).