Class DefaultGPS

  • All Implemented Interfaces:
    GPS, java.io.Serializable

    public class DefaultGPS
    extends java.lang.Object
    implements GPS
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultGPS()  
      DefaultGPS​(double latitude, double longitude)  
      DefaultGPS​(int[] latitudeDMS, int[] longitudeDMS)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      GPS create​(double latitude, double longitude)
      Creates IGPS basing on the string DMS(Degrees, Minutes, Second) representations of longitude and latitude
      GPS create​(java.lang.String latitude, java.lang.String longitude)
      Creates IGPS basing on the decimal longitude and latitude
      double getDecimalLatitude()
      Returns the decimal representation of latitude
      double getDecimalLongitude()
      Returns the decimal representation of longitude
      java.lang.String toDMSString()
      Returns DMS representation of coordinates
      java.lang.String toGeocodeServiceFormat()
      Returns lat/long representation of coordinates in the format acceptable by google Service
      java.lang.String toString()
      Returns decimal representation of coordinates
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DefaultGPS

        public DefaultGPS()
      • DefaultGPS

        public DefaultGPS​(double latitude,
                          double longitude)
        Parameters:
        longitude -
        latitude -
      • DefaultGPS

        public DefaultGPS​(int[] latitudeDMS,
                          int[] longitudeDMS)
        Parameters:
        longitudeDMS -
        latitudeDMS -
    • Method Detail

      • create

        public GPS create​(java.lang.String latitude,
                          java.lang.String longitude)
        Description copied from interface: GPS
        Creates IGPS basing on the decimal longitude and latitude
        Specified by:
        create in interface GPS
        Returns:
        IGPS
      • create

        public GPS create​(double latitude,
                          double longitude)
        Description copied from interface: GPS
        Creates IGPS basing on the string DMS(Degrees, Minutes, Second) representations of longitude and latitude
        Specified by:
        create in interface GPS
        Returns:
        IGPS
      • getDecimalLatitude

        public double getDecimalLatitude()
        Description copied from interface: GPS
        Returns the decimal representation of latitude
        Specified by:
        getDecimalLatitude in interface GPS
        Returns:
        double
      • getDecimalLongitude

        public double getDecimalLongitude()
        Description copied from interface: GPS
        Returns the decimal representation of longitude
        Specified by:
        getDecimalLongitude in interface GPS
        Returns:
        double
      • toDMSString

        public java.lang.String toDMSString()
        Description copied from interface: GPS
        Returns DMS representation of coordinates
        Specified by:
        toDMSString in interface GPS
        Returns:
        String
      • toString

        public java.lang.String toString()
        Description copied from interface: GPS
        Returns decimal representation of coordinates
        Specified by:
        toString in interface GPS
        Overrides:
        toString in class java.lang.Object
        Returns:
        String
      • toGeocodeServiceFormat

        public java.lang.String toGeocodeServiceFormat()
        Description copied from interface: GPS
        Returns lat/long representation of coordinates in the format acceptable by google Service
        Specified by:
        toGeocodeServiceFormat in interface GPS
        Returns:
        String