public abstract class SkyUnits extends Object
| Modifier and Type | Field and 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 and Description |
|---|---|
protected |
SkyUnits(String name)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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() |
public static final SkyUnits DEGREES
public static final SkyUnits RADIANS
public static final SkyUnits SEXAGESIMAL
public static final SkyUnits DEFAULT_UNIT
protected SkyUnits(String name)
public abstract double[] decode(Object c1, Object c2)
c1 - first input coordinate, in these unitsc2 - second input coordinate, in these unitspublic abstract Object[] encode(double c1, double c2)
c1 - first input coordinate, in radiansc2 - second input coordinate, in radianspublic abstract String[] getUnitStrings()
public abstract Class<?>[] getUnitTypes()
decode method and will be returned
from the encode methodpublic String getName()
public static SkyUnits[] getKnownUnits()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.