Class NumberRangePrefixTree.SpanUnitsNRShape
- java.lang.Object
-
- org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.SpanUnitsNRShape
-
- All Implemented Interfaces:
Cloneable,NumberRangePrefixTree.NRShape,org.locationtech.spatial4j.shape.Shape
- Enclosing class:
- NumberRangePrefixTree
public class NumberRangePrefixTree.SpanUnitsNRShape extends Object implements NumberRangePrefixTree.NRShape
A range Shape; based on a pair ofNumberRangePrefixTree.UnitNRShape. Spatially speaking, it's analogous to a Rectangle but 1D. It might have been named with Range in the name but it may be confusing since even theNumberRangePrefixTree.UnitNRShapeis in some sense a range.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NumberRangePrefixTree.SpanUnitsNRShapeclone()A deep clone.booleanequals(Object o)doublegetArea(org.locationtech.spatial4j.context.SpatialContext spatialContext)org.locationtech.spatial4j.shape.RectanglegetBoundingBox()org.locationtech.spatial4j.shape.ShapegetBuffered(double v, org.locationtech.spatial4j.context.SpatialContext spatialContext)org.locationtech.spatial4j.shape.PointgetCenter()org.locationtech.spatial4j.context.SpatialContextgetContext()NumberRangePrefixTree.UnitNRShapegetMaxUnit()NumberRangePrefixTree.UnitNRShapegetMinUnit()booleanhasArea()inthashCode()booleanisEmpty()org.locationtech.spatial4j.shape.SpatialRelationrelate(NumberRangePrefixTree.SpanUnitsNRShape ext)org.locationtech.spatial4j.shape.SpatialRelationrelate(org.locationtech.spatial4j.shape.Shape shape)NumberRangePrefixTree.NRShaperoundToLevel(int targetLevel)Returns this shape rounded to the target level.StringtoString()The result should be parseable byNumberRangePrefixTree.parseShape(String).
-
-
-
Method Detail
-
getContext
public org.locationtech.spatial4j.context.SpatialContext getContext()
- Specified by:
getContextin interfaceorg.locationtech.spatial4j.shape.Shape
-
getMinUnit
public NumberRangePrefixTree.UnitNRShape getMinUnit()
-
getMaxUnit
public NumberRangePrefixTree.UnitNRShape getMaxUnit()
-
roundToLevel
public NumberRangePrefixTree.NRShape roundToLevel(int targetLevel)
Description copied from interface:NumberRangePrefixTree.NRShapeReturns 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:
roundToLevelin interfaceNumberRangePrefixTree.NRShape
-
relate
public org.locationtech.spatial4j.shape.SpatialRelation relate(org.locationtech.spatial4j.shape.Shape shape)
- Specified by:
relatein interfaceorg.locationtech.spatial4j.shape.Shape
-
relate
public org.locationtech.spatial4j.shape.SpatialRelation relate(NumberRangePrefixTree.SpanUnitsNRShape ext)
-
getBoundingBox
public org.locationtech.spatial4j.shape.Rectangle getBoundingBox()
- Specified by:
getBoundingBoxin interfaceorg.locationtech.spatial4j.shape.Shape
-
hasArea
public boolean hasArea()
- Specified by:
hasAreain interfaceorg.locationtech.spatial4j.shape.Shape
-
getArea
public double getArea(org.locationtech.spatial4j.context.SpatialContext spatialContext)
- Specified by:
getAreain interfaceorg.locationtech.spatial4j.shape.Shape
-
getCenter
public org.locationtech.spatial4j.shape.Point getCenter()
- Specified by:
getCenterin interfaceorg.locationtech.spatial4j.shape.Shape
-
getBuffered
public org.locationtech.spatial4j.shape.Shape getBuffered(double v, org.locationtech.spatial4j.context.SpatialContext spatialContext)- Specified by:
getBufferedin interfaceorg.locationtech.spatial4j.shape.Shape
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.locationtech.spatial4j.shape.Shape
-
clone
public NumberRangePrefixTree.SpanUnitsNRShape clone()
A deep clone.
-
toString
public String toString()
Description copied from interface:NumberRangePrefixTree.NRShapeThe result should be parseable byNumberRangePrefixTree.parseShape(String).- Specified by:
toStringin interfaceNumberRangePrefixTree.NRShape- Overrides:
toStringin classObject
-
equals
public boolean equals(Object o)
-
-