org.apache.lucene.spatial.prefix.tree

## Class S2PrefixTree.Factory

- java.lang.Object
- - org.apache.lucene.spatial.prefix.tree.SpatialPrefixTreeFactory
  - - org.apache.lucene.spatial.prefix.tree.S2PrefixTree.Factory

- Enclosing class:
    S2PrefixTree

      protected static class S2PrefixTree.Factory
      extends SpatialPrefixTreeFactory

  Factory for creating `S2PrefixTree` instances with useful defaults

- - ### Field Summary

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

      `args, ctx, MAX_DIST_ERR, MAX_LEVELS, maxLevels, PREFIX_TREE, VERSION`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `Factory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `getLevelForDistance(double degrees)` Calls `SpatialPrefixTree.getLevelForDistance(double)`.
    `protected SpatialPrefixTree` | `newSPT()`

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

      `getVersion, init, initMaxLevels, initVersion, makeSPT, setVersion`

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

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

- - ### Constructor Detail

    - #### Factory

          protected Factory()

  - ### Method Detail

    - #### getLevelForDistance

          protected int getLevelForDistance(double degrees)

      Description copied from class: `SpatialPrefixTreeFactory`
      Calls `SpatialPrefixTree.getLevelForDistance(double)`.
      Specified by:
        `getLevelForDistance` in class `SpatialPrefixTreeFactory`

    - #### newSPT

          protected SpatialPrefixTree newSPT()

      Specified by:
        `newSPT` in class `SpatialPrefixTreeFactory`

Copyright © 2000-2024 Apache Software Foundation. All Rights Reserved.