public abstract class SkyUnits
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
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).
|
Modifier | Constructor | Description |
---|---|---|
protected |
SkyUnits(java.lang.String name) |
Constructor.
|
Modifier and Type | Method | Description |
---|---|---|
abstract double[] |
decode(java.lang.Object c1,
java.lang.Object c2) |
Takes a pair of objects representing coordinates in these units,
and converts them to radians.
|
abstract java.lang.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.
|
java.lang.String |
getName() |
Returns the name of this unit system.
|
static SkyUnits |
getUnitsFor(java.lang.String unitName) |
Returns a unit as specified by a name.
|
abstract java.lang.String[] |
getUnitStrings() |
Returns a pair of descriptions for the units of the first and
second coordinates represented by these units.
|
abstract java.lang.Class[] |
getUnitTypes() |
Returns a pair of classes for the first and second coordinates
represented by these units.
|
java.lang.String |
toString() |
public static final SkyUnits DEGREES
public static final SkyUnits RADIANS
public static final SkyUnits SEXAGESIMAL
public static final SkyUnits DEFAULT_UNIT
public abstract double[] decode(java.lang.Object c1, java.lang.Object c2)
c1
- first input coordinate, in these unitsc2
- second input coordinate, in these unitspublic abstract java.lang.Object[] encode(double c1, double c2)
c1
- first input coordinate, in radiansc2
- second input coordinate, in radianspublic abstract java.lang.String[] getUnitStrings()
public abstract java.lang.Class[] getUnitTypes()
decode
method and will be returned
from the encode
methodpublic java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public static SkyUnits[] getKnownUnits()
public static SkyUnits getUnitsFor(java.lang.String unitName)
Copyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.