Class PointImpl

java.lang.Object
org.openspaces.spatial.shapes.impl.PointImpl
All Implemented Interfaces:
Externalizable, Serializable, Point, Shape, Spatial4jShapeProvider

public class PointImpl extends Object implements Point, Spatial4jShapeProvider, Externalizable
Since:
11.0
Author:
Barak Bar Orion
See Also:
  • Constructor Details

    • PointImpl

      public PointImpl()
    • PointImpl

      public PointImpl(double x, double y)
  • Method Details

    • getX

      public double getX()
      Description copied from interface: Point
      The X coordinate, or Longitude in geospatial context.
      Specified by:
      getX in interface Point
    • getY

      public double getY()
      Description copied from interface: Point
      The Y coordinate, or Latitude in geospatial context.
      Specified by:
      getY in interface Point
    • toString

      public String toString(ShapeFormat shapeFormat)
      Description copied from interface: Shape
      Returns a string representation of the shape using the specified format.
      Specified by:
      toString in interface Shape
      Parameters:
      shapeFormat - The format which will be used to format the shape.
      Returns:
      A string representation of the shape.
    • appendTo

      public StringBuilder appendTo(StringBuilder stringBuilder, ShapeFormat shapeFormat)
      Description copied from interface: Shape
      Appends a string representation of the shape using the specified format
      Specified by:
      appendTo in interface Shape
      Parameters:
      stringBuilder - The string builder to append to
      shapeFormat - The format which will be used to format the shape
      Returns:
      The string builder
    • getSpatial4jShape

      public org.locationtech.spatial4j.shape.Shape getSpatial4jShape(org.locationtech.spatial4j.context.SpatialContext spatialContext)
      Description copied from interface: Spatial4jShapeProvider
      Gets a Spatial4j shape from the current object
      Specified by:
      getSpatial4jShape in interface Spatial4jShapeProvider
      Parameters:
      spatialContext - The SpatialContext which will be used to construct the shape, if needed.
      Returns:
      A Spatial4j shape
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • writeExternal

      public void writeExternal(ObjectOutput out) throws IOException
      Specified by:
      writeExternal in interface Externalizable
      Throws:
      IOException
    • readExternal

      public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
      Specified by:
      readExternal in interface Externalizable
      Throws:
      IOException
      ClassNotFoundException