|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.convert.SkyUnits
public abstract class SkyUnits
Class defining units used for a two-coordinate sky coordinate system. Each coordinate represents an angle.
Field Summary | |
---|---|
static SkyUnits |
DEFAULT_UNIT
Default unit (DEGREES). |
static SkyUnits |
DEGREES
Degrees. |
static SkyUnits |
RADIANS
Radians. |
static SkyUnits |
SEXAGESIMAL
Sexagesimal (hh:mm:ss.s, dd:mm:ss.s). |
Constructor Summary | |
---|---|
protected |
SkyUnits(String name)
Constructor. |
Method Summary | |
---|---|
abstract double[] |
decode(Object c1,
Object c2)
Takes a pair of objects representing coordinates in these units, and converts them to radians. |
abstract Object[] |
encode(double c1,
double c2)
Takes a pair of coordinates in radians and converts them to these units. |
static SkyUnits[] |
getKnownUnits()
Returns a list of all the available instances of this class. |
String |
getName()
Returns the name of this unit system. |
static SkyUnits |
getUnitsFor(String unitName)
Returns a unit as specified by a name. |
abstract String[] |
getUnitStrings()
Returns a pair of descriptions for the units of the first and second coordinates represented by these units. |
abstract Class[] |
getUnitTypes()
Returns a pair of classes for the first and second coordinates represented by these units. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final SkyUnits DEGREES
public static final SkyUnits RADIANS
public static final SkyUnits SEXAGESIMAL
public static final SkyUnits DEFAULT_UNIT
Constructor Detail |
---|
protected SkyUnits(String name)
Method Detail |
---|
public abstract double[] decode(Object c1, Object c2)
c1
- first input coordinate, in these unitsc2
- second input coordinate, in these units
public abstract Object[] encode(double c1, double c2)
c1
- first input coordinate, in radiansc2
- second input coordinate, in radians
public abstract String[] getUnitStrings()
public abstract Class[] getUnitTypes()
decode
method and will be returned
from the encode
methodpublic String getName()
public String toString()
toString
in class Object
public static SkyUnits[] getKnownUnits()
public static SkyUnits getUnitsFor(String unitName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |