Package adams.data.spreadsheet
Class GPSDecimalSeconds
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
-
- adams.data.spreadsheet.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 forGPSDecimalSeconds
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".
-
Constructor Summary
Constructors Constructor Description GPSDecimalSeconds()
-
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
-
-
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.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 interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classadams.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 interfaceGPSObjectHandler
- 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 interfaceGPSObjectHandler
- Returns:
- true if swapped
-
swappedTipText
public String swappedTipText()
Returns the tip text for this property.- Specified by:
swappedTipText
in interfaceGPSObjectHandler
- 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 classadams.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 classadams.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 classadams.data.spreadsheet.AbstractObjectHandler<AbstractGPS>
- Parameters:
obj
- the object to convert into a string- Returns:
- the string representation
-
-