Package org.ka2ddo.yaac.util
Enum Class LatLonFormatter.Format
- All Implemented Interfaces:
Serializable
,Comparable<LatLonFormatter.Format>
,Constable
- Enclosing class:
- LatLonFormatter
Define the supported different formats for latitude and longitude display.
- Author:
- Andrew Pavlin, KA2DDO
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFormat a latitude or longitude in fractional degrees.Format a latitude or longitude in degrees and fractional minutes.Format a latitude or longitude in degrees, minutes, and seconds,Format a latitude/longitude pair in UTM (Universal Transverse Mercator) encoding. -
Method Summary
Modifier and TypeMethodDescriptionabstract String
format
(double value, boolean isLat) Convert the specified latitude or longitude value into a String of this format.toString()
Return the user-pretty version of this enum's name.static LatLonFormatter.Format
Returns the enum constant of this class with the specified name.static LatLonFormatter.Format[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DDMM_MM
Format a latitude or longitude in degrees and fractional minutes. -
DDMMSS
Format a latitude or longitude in degrees, minutes, and seconds, -
DD_DDDDDD
Format a latitude or longitude in fractional degrees. -
UTM
Format a latitude/longitude pair in UTM (Universal Transverse Mercator) encoding.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
format
Convert the specified latitude or longitude value into a String of this format.- Parameters:
value
- value in fractional degrees North or EastisLat
- whether to interpret this as a latitude or longitude value- Returns:
- formatted String value
-
toString
Return the user-pretty version of this enum's name.- Overrides:
toString
in classEnum<LatLonFormatter.Format>
- Returns:
- the pretty name of this enum constant
-