oracle.panama.spatial
Class PointImpl

java.lang.Object
  |
  +--oracle.panama.spatial.PointImpl
All Implemented Interfaces:
Point

public class PointImpl
extends java.lang.Object
implements Point

This class defines a point with its coordinates lat/lon and an optional label, such as a company name. This class is thread-safe due to synchronization of the relevant member functions.


Constructor Summary
PointImpl()
          Constructor
PointImpl(double longitude, double latitude)
          Constructor
PointImpl(double longitude, double latitude, double radiusInMeters)
          Constructor
PointImpl(double longitude, double latitude, java.lang.String label)
          Constructor
PointImpl(double longitude, double latitude, java.lang.String label, double radiusInMeters)
          Constructor
 
Method Summary
TypeMethod
 double getDistance(Point otherPoint)
          This function determines the distance between two points on the earth along the shortest arc on the earth surface.
 java.lang.String getLabel()
          This returns the label of this PointImpl.
 double getLatitude()
          This returns the latitude of this PointImpl.
 double getLongitude()
          This returns the longitude of this PointImpl.
 double getRadius()
          This returns the optional radius around this PointImpl.
 void set(double longitude, double latitude, java.lang.String label, double radiusInMeters)
          Setter for point data
 void set(Point otherPoint)
          Setter for point data
 void setLabel(java.lang.String name)
           
 void setLatitude(double latitude)
           
 void setLongitude(double longitude)
           
 void setRadius(double radius)
           
 java.lang.String toString()
          This returns a String representing this PointImpl
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PointImpl

public PointImpl(double longitude,
                 double latitude)
Constructor
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)

PointImpl

public PointImpl(double longitude,
                 double latitude,
                 java.lang.String label)
Constructor
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)

PointImpl

public PointImpl(double longitude,
                 double latitude,
                 java.lang.String label,
                 double radiusInMeters)
Constructor
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)
radiusInMeters - a double representing an optional radius around this point

PointImpl

public PointImpl()
Constructor

PointImpl

public PointImpl(double longitude,
                 double latitude,
                 double radiusInMeters)
Constructor
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
radiusInMeters - a double representing an optional radius around this point
Method Detail

set

public void set(double longitude,
                double latitude,
                java.lang.String label,
                double radiusInMeters)
Setter for point data
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)
radiusInMeters - a double representing an optional radius around this point

set

public void set(Point otherPoint)
Setter for point data
Parameters:
longitude - a double representing the longitude of this PointImpl (must not be null)
latitude - a double representing the latitude of this PointImpl (must not be null)
label - a String representing a label for this PointImpl (may be null)
radiusInMeters - a double representing an optional radius around this point

getLabel

public java.lang.String getLabel()
This returns the label of this PointImpl.
Specified by:
getLabel in interface Point
Returns:
a String representing the label of this PointImpl

getRadius

public double getRadius()
This returns the optional radius around this PointImpl.
Specified by:
getRadius in interface Point
Returns:
a double representing the radius around this PointImpl (0 by default)

getLatitude

public double getLatitude()
This returns the latitude of this PointImpl.
Specified by:
getLatitude in interface Point
Returns:
the latitude of this PointImpl

getLongitude

public double getLongitude()
This returns the longitude of this PointImpl.
Specified by:
getLongitude in interface Point
Returns:
the longitude of this PointImpl

getDistance

public double getDistance(Point otherPoint)
This function determines the distance between two points on the earth along the shortest arc on the earth surface.
Specified by:
getDistance in interface Point
Parameters:
otherPoint - a PointImpl representing the other PointImpl to which to determine the distance
Returns:
a double representing the distance in meters

toString

public java.lang.String toString()
This returns a String representing this PointImpl
Overrides:
toString in class java.lang.Object
Returns:
a String representing this PointImpl

setLabel

public void setLabel(java.lang.String name)
Specified by:
setLabel in interface Point

setLatitude

public void setLatitude(double latitude)
Specified by:
setLatitude in interface Point

setLongitude

public void setLongitude(double longitude)
Specified by:
setLongitude in interface Point

setRadius

public void setRadius(double radius)
Specified by:
setRadius in interface Point