org.apache.lucene.spatial.prefix.tree

## Class NumberRangePrefixTree.SpanUnitsNRShape

- java.lang.Object
- - org.apache.lucene.spatial.prefix.tree.NumberRangePrefixTree.SpanUnitsNRShape

- All Implemented Interfaces:
    com.spatial4j.core.shape.Shape, Cloneable, NumberRangePrefixTree.NRShape
  Enclosing class:
    NumberRangePrefixTree

      public class NumberRangePrefixTree.SpanUnitsNRShape
      extends Object
      implements NumberRangePrefixTree.NRShape

  A range Shape; based on a pair of `NumberRangePrefixTree.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 the `NumberRangePrefixTree.UnitNRShape` is in some sense a range.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `NumberRangePrefixTree.SpanUnitsNRShape` | `clone()` A deep clone.
    `boolean` | `equals(Object o)`
    `double` | `getArea(com.spatial4j.core.context.SpatialContext spatialContext)`
    `com.spatial4j.core.shape.Rectangle` | `getBoundingBox()`
    `com.spatial4j.core.shape.Shape` | `getBuffered(double v, com.spatial4j.core.context.SpatialContext spatialContext)`
    `com.spatial4j.core.shape.Point` | `getCenter()`
    `com.spatial4j.core.context.SpatialContext` | `getContext()`
    `NumberRangePrefixTree.UnitNRShape` | `getMaxUnit()`
    `NumberRangePrefixTree.UnitNRShape` | `getMinUnit()`
    `boolean` | `hasArea()`
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `com.spatial4j.core.shape.SpatialRelation` | `relate(NumberRangePrefixTree.SpanUnitsNRShape ext)`
    `com.spatial4j.core.shape.SpatialRelation` | `relate(com.spatial4j.core.shape.Shape shape)`
    `NumberRangePrefixTree.NRShape` | `roundToLevel(int targetLevel)` Returns this shape rounded to the target level.
    `String` | `toString()` The result should be parseable by `NumberRangePrefixTree.parseShape(String)`.

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getContext

          public com.spatial4j.core.context.SpatialContext getContext()

      Specified by:
        `getContext` in interface `com.spatial4j.core.shape.Shape`

    - #### getMinUnit

          public NumberRangePrefixTree.UnitNRShape getMinUnit()

    - #### getMaxUnit

          public NumberRangePrefixTree.UnitNRShape getMaxUnit()

    - #### roundToLevel

          public NumberRangePrefixTree.NRShape 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 interface `NumberRangePrefixTree.NRShape`

    - #### relate

          public com.spatial4j.core.shape.SpatialRelation relate(com.spatial4j.core.shape.Shape shape)

      Specified by:
        `relate` in interface `com.spatial4j.core.shape.Shape`

    - #### relate

          public com.spatial4j.core.shape.SpatialRelation relate(NumberRangePrefixTree.SpanUnitsNRShape ext)

    - #### getBoundingBox

          public com.spatial4j.core.shape.Rectangle getBoundingBox()

      Specified by:
        `getBoundingBox` in interface `com.spatial4j.core.shape.Shape`

    - #### hasArea

          public boolean hasArea()

      Specified by:
        `hasArea` in interface `com.spatial4j.core.shape.Shape`

    - #### getArea

          public double getArea(com.spatial4j.core.context.SpatialContext spatialContext)

      Specified by:
        `getArea` in interface `com.spatial4j.core.shape.Shape`

    - #### getCenter

          public com.spatial4j.core.shape.Point getCenter()

      Specified by:
        `getCenter` in interface `com.spatial4j.core.shape.Shape`

    - #### getBuffered

          public com.spatial4j.core.shape.Shape getBuffered(double v,
                                                   com.spatial4j.core.context.SpatialContext spatialContext)

      Specified by:
        `getBuffered` in interface `com.spatial4j.core.shape.Shape`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `com.spatial4j.core.shape.Shape`

    - #### clone

          public NumberRangePrefixTree.SpanUnitsNRShape clone()

      A deep clone.
      Overrides:
        `clone` in class `Object`

    - #### toString

          public String toString()

      Description copied from interface: `NumberRangePrefixTree.NRShape`
      The result should be parseable by `NumberRangePrefixTree.parseShape(String)`.
      Specified by:
        `toString` in interface `NumberRangePrefixTree.NRShape`
      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in interface `com.spatial4j.core.shape.Shape`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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