|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjsky.coords.DMS
public class DMS
Class representing a value of the form "deg:min:sec".
Constructor Summary | |
---|---|
DMS()
Default constructor: initialize to null values |
|
DMS(DMS hms)
Copy constructor |
|
DMS(double val)
Initialize from a decimal value and calculate H:M:S.sss. |
|
DMS(double degrees,
int min,
double sec)
Initialize with the given degrees, minutes and seconds. |
|
DMS(String s)
Initialize from a string value, in format H:M:S.sss, hh, d.ddd, or H M S. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
Define equality based on the value |
int |
getDegrees()
Return the number of degrees (not including minutes or seconds) |
int |
getMin()
Return the number of minutes (not including degrees or seconds) |
double |
getSec()
Return the number of seconds (not including degrees and minutes) |
byte |
getSign()
Return the sign of the value |
double |
getVal()
Return the value (fractional number of degrees) as a double |
boolean |
isInitialized()
Return true if this object has been initialized with a valid value |
static void |
main(String[] args)
Test cases |
void |
set(double degrees,
int min,
double sec)
Set the degrees, minutes and seconds. |
void |
setVal(double val)
Set from a decimal value and calculate H:M:S.sss. |
String |
toString()
Return the value as a String in the form hh:mm:ss.sss. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DMS()
public DMS(double degrees, int min, double sec)
public DMS(double val)
public DMS(DMS hms)
public DMS(String s)
Method Detail |
---|
public void set(double degrees, int min, double sec)
public void setVal(double val)
public String toString()
toString
in class Object
public boolean isInitialized()
public int getDegrees()
public int getMin()
public double getSec()
public double getVal()
public byte getSign()
public boolean equals(Object obj)
equals
in class Object
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |