Class GPSDecimalSeconds

  • All Implemented Interfaces:
    adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, GPSObjectHandler, Serializable

    public class GPSDecimalSeconds
    extends adams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
    implements GPSObjectHandler
    Handler for GPSDecimalSeconds objects.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean m_Swapped
      whether format is "long lat" instead of "lat long".
      • Fields inherited from class adams.data.spreadsheet.AbstractObjectHandler

        m_Handlers, m_NoHandlers
      • Fields inherited from class adams.core.option.AbstractOptionHandler

        m_OptionManager
      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void defineOptions()
      Adds options to the internal list of options.
      String format​(AbstractGPS obj)
      Turns the given object back into a string.
      boolean getSwapped()
      Returns whether the format is swapped, 'long lat' instead of 'lat long'.
      String globalInfo()
      Returns a string describing the object.
      boolean handles​(Class cls)
      Checks whether the handler can process the given class.
      GPSDecimalSeconds parse​(String s)
      Parses the given string.
      void setSwapped​(boolean value)
      Sets whether the format is swapped, 'long lat' instead of 'lat long'.
      String swappedTipText()
      Returns the tip text for this property.
      • Methods inherited from class adams.data.spreadsheet.AbstractObjectHandler

        getHandler, getHandler, getHandlers, handles
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

        getLoggingLevel
    • Field Detail

      • m_Swapped

        protected boolean m_Swapped
        whether format is "long lat" instead of "lat long".
    • Constructor Detail

      • GPSDecimalSeconds

        public GPSDecimalSeconds()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        Returns:
        a description suitable for displaying in the gui
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options.
        Specified by:
        defineOptions in interface adams.core.option.OptionHandler
        Overrides:
        defineOptions in class adams.core.option.AbstractOptionHandler
      • setSwapped

        public void setSwapped​(boolean value)
        Sets whether the format is swapped, 'long lat' instead of 'lat long'.
        Specified by:
        setSwapped in interface GPSObjectHandler
        Parameters:
        value - true if swapped
      • getSwapped

        public boolean getSwapped()
        Returns whether the format is swapped, 'long lat' instead of 'lat long'.
        Specified by:
        getSwapped in interface GPSObjectHandler
        Returns:
        true if swapped
      • swappedTipText

        public String swappedTipText()
        Returns the tip text for this property.
        Specified by:
        swappedTipText in interface GPSObjectHandler
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • handles

        public boolean handles​(Class cls)
        Checks whether the handler can process the given class.
        Specified by:
        handles in class adams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
        Parameters:
        cls - the class to check
        Returns:
        true if handler can process the class
      • parse

        public GPSDecimalSeconds parse​(String s)
        Parses the given string.
        Specified by:
        parse in class adams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
        Parameters:
        s - the string
        Returns:
        the generated object, null if failed to convert
      • format

        public String format​(AbstractGPS obj)
        Turns the given object back into a string.
        Specified by:
        format in class adams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
        Parameters:
        obj - the object to convert into a string
        Returns:
        the string representation