Interface NumberRangePrefixTree.UnitNRShape
-
- All Superinterfaces:
Cloneable
,Comparable<NumberRangePrefixTree.UnitNRShape>
,NumberRangePrefixTree.NRShape
,org.locationtech.spatial4j.shape.Shape
- All Known Implementing Classes:
NumberRangePrefixTree.NRCell
- Enclosing class:
- NumberRangePrefixTree
public static interface NumberRangePrefixTree.UnitNRShape extends NumberRangePrefixTree.NRShape, Comparable<NumberRangePrefixTree.UnitNRShape>
A unit value Shape implemented as a stack of numbers, one for each level in the prefix tree. It directly corresponds to aCell
. Spatially speaking, it's analogous to a Point but 1D and has some precision width.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NumberRangePrefixTree.UnitNRShape
clone()
Deep cloneint
getLevel()
Get the prefix tree level, the higher the more precise.NumberRangePrefixTree.UnitNRShape
getShapeAtLevel(int level)
Gets an ancestor at the specified level.int
getValAtLevel(int level)
Gets the value at the specified level of this unit.NumberRangePrefixTree.UnitNRShape
roundToLevel(int targetLevel)
Returns this shape rounded to the target level.-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.NRShape
toString
-
-
-
-
Method Detail
-
getLevel
int getLevel()
Get the prefix tree level, the higher the more precise. 0 means the world (universe).
-
getValAtLevel
int getValAtLevel(int level)
Gets the value at the specified level of this unit. level must be >= 0 and <= getLevel().
-
getShapeAtLevel
NumberRangePrefixTree.UnitNRShape getShapeAtLevel(int level)
Gets an ancestor at the specified level. It shares state, so you may want to clone() it.
-
roundToLevel
NumberRangePrefixTree.UnitNRShape roundToLevel(int targetLevel)
Description copied from interface:NumberRangePrefixTree.NRShape
Returns this shape rounded to the target level. If we are already more course than the level then the shape is simply returned. The result may refer to internal state of the argument so you may want to clone it.- Specified by:
roundToLevel
in interfaceNumberRangePrefixTree.NRShape
-
clone
NumberRangePrefixTree.UnitNRShape clone()
Deep clone
-
-