triptracker.core
Class Sexagesimal

java.lang.Object
  extended by triptracker.core.Sexagesimal

public class Sexagesimal
extends Object

Util class to represent a coordinate in sexagesimal format.


Constructor Summary
Sexagesimal(double degrees)
           
Sexagesimal(int degrees, int minutes, double seconds)
           
 
Method Summary
static Sexagesimal decToSex(double degrees)
           
 int getDeg()
           
 int getMin()
           
 double getSec()
           
 String toString()
          Returns a sexagesimal formatted string representation of a coordinate.
static String toString(double degrees)
          Returns a sexagesimal formatted string representation of a coordinate.
 String toString(int decimals)
          Returns a sexagesimal formatted string representation of a coordinate with the given number of decimals for seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sexagesimal

public Sexagesimal(int degrees,
                   int minutes,
                   double seconds)

Sexagesimal

public Sexagesimal(double degrees)
Method Detail

decToSex

public static Sexagesimal decToSex(double degrees)

getDeg

public int getDeg()

getMin

public int getMin()

getSec

public double getSec()

toString

public String toString()
Returns a sexagesimal formatted string representation of a coordinate.

Overrides:
toString in class Object
See Also:
Object.toString()

toString

public String toString(int decimals)
Returns a sexagesimal formatted string representation of a coordinate with the given number of decimals for seconds.

Parameters:
decimals -
Returns:
sexagesimal representation of a coordinate as String

toString

public static String toString(double degrees)
Returns a sexagesimal formatted string representation of a coordinate.



Copyright © 2006 Team Trip Tracker. All Rights Reserved.