openlr.map
Class GeoCoordinatesImpl

java.lang.Object
  extended by openlr.map.GeoCoordinatesImpl
All Implemented Interfaces:
GeoCoordinates

public class GeoCoordinatesImpl
extends Object
implements GeoCoordinates

This class is an implementation of interface GeoCoordinates.

OpenLR is a trade mark of TomTom International B.V.

email: software@openlr.org

Author:
TomTom International B.V.

Constructor Summary
GeoCoordinatesImpl(double lon, double lat)
          Instantiates a new geo-coordinate.
 
Method Summary
 boolean equals(Object obj)
          
 double getLatitudeDeg()
          Gets the latitude deg.
 double getLongitudeDeg()
          Gets the longitude deg.
 int hashCode()
          
static GeoCoordinatesImpl newGeoCoordinatesUnchecked(double lon, double lat)
          Instantiates a new geo-coordinate without declaration of a checked exception.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GeoCoordinatesImpl

public GeoCoordinatesImpl(double lon,
                          double lat)
                   throws InvalidMapDataException
Instantiates a new geo-coordinate.

Parameters:
lon - the lon
lat - the lat
Throws:
InvalidMapDataException - the invalid map data exception
Method Detail

newGeoCoordinatesUnchecked

public static final GeoCoordinatesImpl newGeoCoordinatesUnchecked(double lon,
                                                                  double lat)
Instantiates a new geo-coordinate without declaration of a checked exception. If the given coordinates data are invalid an IllegalArgumentException is thrown instead.

Parameters:
lon - the longitude
lat - the latitude
Returns:
The created instance of GeoCoordinatesImpl

getLatitudeDeg

public final double getLatitudeDeg()
Gets the latitude deg.

Specified by:
getLatitudeDeg in interface GeoCoordinates
Returns:
the latitude deg

getLongitudeDeg

public final double getLongitudeDeg()
Gets the longitude deg.

Specified by:
getLongitudeDeg in interface GeoCoordinates
Returns:
the longitude deg

toString

public String toString()

Overrides:
toString in class Object

hashCode

public final int hashCode()

Specified by:
hashCode in interface GeoCoordinates
Overrides:
hashCode in class Object

equals

public final boolean equals(Object obj)

Specified by:
equals in interface GeoCoordinates
Overrides:
equals in class Object


Copyright © 2013 TomTom International B.V.. All Rights Reserved.