org.ka2ddo.yaac.util
Enum LatLonFormatter.Format

java.lang.Object
  extended by java.lang.Enum<LatLonFormatter.Format>
      extended by org.ka2ddo.yaac.util.LatLonFormatter.Format
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<LatLonFormatter.Format>
Enclosing class:
LatLonFormatter

public static enum LatLonFormatter.Format
extends java.lang.Enum<LatLonFormatter.Format>

Define the supported different formats for latitude and longitude display.


Enum Constant Summary
DD_DDDDDD
           
DDMM_MM
           
DDMMSS
           
UTM
           
 
Field Summary
protected  boolean forDisplay
           
 
Method Summary
abstract  java.lang.String format(double value, boolean isLat)
          Convert the specified latitude or longitude value into a String of this format.
 java.lang.String toString()
          Return the user-pretty version of this enum's name.
static LatLonFormatter.Format valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static LatLonFormatter.Format[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DDMM_MM

public static final LatLonFormatter.Format DDMM_MM

DDMMSS

public static final LatLonFormatter.Format DDMMSS

DD_DDDDDD

public static final LatLonFormatter.Format DD_DDDDDD

UTM

public static final LatLonFormatter.Format UTM
Field Detail

forDisplay

protected final boolean forDisplay
Method Detail

values

public static LatLonFormatter.Format[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LatLonFormatter.Format c : LatLonFormatter.Format.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LatLonFormatter.Format valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

format

public abstract java.lang.String format(double value,
                                        boolean isLat)
Convert the specified latitude or longitude value into a String of this format.

Parameters:
value - value in fractional degrees North or East
isLat - whether to interpret this as a latitude or longitude value
Returns:
formatted String value

toString

public java.lang.String toString()
Return the user-pretty version of this enum's name.

Overrides:
toString in class java.lang.Enum<LatLonFormatter.Format>
Returns:
the pretty name of this enum constant