public class Star extends java.lang.Object implements SkyObject, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected double |
xdd
Recalculated for different star charts.
|
protected double |
zdd
Recalculated for different star charts.
|
Constructor and Description |
---|
Star()
Set the fields individually after construction, if you really must.
|
Star(java.lang.String commonId,
java.lang.String hipparcosId,
java.lang.String tychoId,
RA ra,
Dec dec,
Epoch epoch,
Magnitude magnitude,
Variability variability)
Generally two of the ids passed in will be expected to be null; they may get set after construction.
|
Star(java.lang.String commonId,
java.lang.String hipparcosId,
java.lang.String tychoId,
RA ra,
Dec dec,
Epoch epoch,
Magnitude magnitude,
Variability variability,
double xdd,
double zdd)
Generally two of the ids passed in will be expected to be null.
|
Star(java.lang.String commonId,
java.lang.String hipparcosId,
java.lang.String tychoId,
RA ra,
Dec dec,
Epoch epoch,
Magnitude magnitude,
Variability variability,
ProperMotion pm)
Generally two of the ids passed in will be expected to be null; they may get set after construction.
|
Star(java.lang.String commonId,
java.lang.String hipparcosId,
java.lang.String tychoId,
RA ra,
Dec dec,
Epoch epoch,
Magnitude magnitude,
Variability variability,
ProperMotion pm,
double xdd,
double zdd)
Generally two of the ids passed in will be expected to be null.
|
Star(java.lang.String commonId,
java.lang.String hipparcosId,
java.lang.String tychoId,
SkyPoint position,
Magnitude magnitude,
Variability variability)
Generally two of the ids passed in will be expected to be null; they may get set after construction.
|
Modifier and Type | Method and Description |
---|---|
void |
addMagnitude(Magnitude m)
Add another magnitude for this star.
|
Star |
clone() |
boolean |
equals(java.lang.Object other)
Does not involve the fields xdd and zdd because a given star may be plotted in different positions on different StarCharts.
|
java.lang.String |
getCommonId()
Comprising the constellation abbreviation and Flamsteed number and/or Bayer letter
(only brightest stars have these).
|
java.lang.String |
getHipparcosId() |
java.lang.String |
getId()
If the star has a commonId return that; otherwise if it has a hipparcosId return that; otherwise if it has a
tychoId return that; otherwise if it has an otherId return that; otherwise return an empty string.
|
Magnitude |
getMagnitude()
Get the "principal" magnitude.
|
Magnitude |
getMagnitude(java.lang.String bandId)
Get the magnitude with given band id, or null if not found.
|
java.util.List<Magnitude> |
getMagnitudes()
Get the list of magnitudes
|
SkyVector |
getOffsetFromTarget()
Typically the offset from the centre of a star chart or the axis of a cone search.
|
java.lang.String |
getOtherId() |
java.awt.Point |
getPlotPoint()
Set when the object is first plotted, to avoid recalculation when redrawing.
|
SkyPoint |
getPosition()
If the star's position is unknown this returns null.
|
ProperMotion |
getProperMotion()
If the star's proper motion is unknown this returns a ProperMotion object in which both components
are zero.
|
java.lang.String |
getTychoId() |
Variability |
getVariability()
If the star's variability is unknown this returns null, not a special value.
|
int |
hashCode()
Enable objects of this class to be used as hash keys.
|
void |
setCommonId(java.lang.String id) |
void |
setHipparcosId(java.lang.String id) |
void |
setMagnitude(Magnitude m)
For entering a manual magnitude value to replace all others (as in BlobMenu).
|
void |
setOffsetFromTarget(SkyVector offset) |
void |
setOtherId(java.lang.String id)
For user-entered reference of their own devising.
|
void |
setPlotPoint(java.awt.Point pt)
Set by StarChart when first plotting the star.
|
void |
setPosition(SkyPoint pt) |
void |
setProperMotion(ProperMotion pm) |
void |
setTychoId(java.lang.String id) |
void |
setVariability(Variability v) |
java.lang.String |
toFoldedString()
More detailed and more suitable for display to the user - reasonably formatted multi-line text.
|
java.lang.String |
toString()
Simplified summary
|
protected transient double xdd
protected transient double zdd
public Star(java.lang.String commonId, java.lang.String hipparcosId, java.lang.String tychoId, RA ra, Dec dec, Epoch epoch, Magnitude magnitude, Variability variability)
public Star(java.lang.String commonId, java.lang.String hipparcosId, java.lang.String tychoId, SkyPoint position, Magnitude magnitude, Variability variability)
public Star(java.lang.String commonId, java.lang.String hipparcosId, java.lang.String tychoId, RA ra, Dec dec, Epoch epoch, Magnitude magnitude, Variability variability, double xdd, double zdd)
public Star(java.lang.String commonId, java.lang.String hipparcosId, java.lang.String tychoId, RA ra, Dec dec, Epoch epoch, Magnitude magnitude, Variability variability, ProperMotion pm)
public Star(java.lang.String commonId, java.lang.String hipparcosId, java.lang.String tychoId, RA ra, Dec dec, Epoch epoch, Magnitude magnitude, Variability variability, ProperMotion pm, double xdd, double zdd)
public Star()
public java.lang.String getId()
public java.lang.String getCommonId()
getCommonId
in interface SkyObject
public void setCommonId(java.lang.String id)
public java.lang.String getHipparcosId()
public void setHipparcosId(java.lang.String id)
public java.lang.String getTychoId()
public void setTychoId(java.lang.String id)
public java.lang.String getOtherId()
public void setOtherId(java.lang.String id)
public SkyPoint getPosition()
getPosition
in interface SkyObject
public void setPosition(SkyPoint pt)
setPosition
in interface SkyObject
public java.util.List<Magnitude> getMagnitudes()
public void addMagnitude(Magnitude m)
public void setMagnitude(Magnitude m)
setMagnitude
in interface SkyObject
public Magnitude getMagnitude()
getMagnitude
in interface SkyObject
public Magnitude getMagnitude(java.lang.String bandId)
public Variability getVariability()
public void setVariability(Variability v)
public ProperMotion getProperMotion()
public void setProperMotion(ProperMotion pm)
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Star clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toFoldedString()
public void setPlotPoint(java.awt.Point pt)
setPlotPoint
in interface SkyObject
public java.awt.Point getPlotPoint()
SkyObject
getPlotPoint
in interface SkyObject
public void setOffsetFromTarget(SkyVector offset)
setOffsetFromTarget
in interface SkyObject
public SkyVector getOffsetFromTarget()
SkyObject
getOffsetFromTarget
in interface SkyObject