|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.pegacat.vcf.data.VoyagerObject | +--com.pegacat.vcf.data.Star
A Star in Voyager - contains a 3D location, as well as spectral data etc.
This class is a data holder for all this info, plus some nice-to-have utility methods for converting raw star data into easy listening descriptive strings...
Field Summary | |
protected java.util.List |
bodies
worlds/moons around this star |
protected int |
dist
|
protected int |
multi
|
protected int |
number
|
protected int |
size
|
protected int |
spectra
|
protected double |
surveyDate
date of the survey |
protected boolean |
surveyed
has the star been star surveyed? |
protected int |
system
|
protected static com.pegacat.vcf.data.StarSystem[] |
systemList
|
Fields inherited from class com.pegacat.vcf.data.VoyagerObject |
location, name, text |
Constructor Summary | |
Star(int number,
int x,
int y,
int z)
|
Method Summary | |
static void |
addStarToSystem(int system,
Star star)
|
double |
distanceFrom(Star other)
Return the distance from another star. |
java.util.List |
getBodies()
|
Body |
getBody(java.lang.String name)
Gets a world/moon by name (NNNA(NN)?) Creation date: (31/05/2001 1:29:14 PM) |
int |
getDist()
|
java.lang.String |
getDistance()
|
int |
getMulti()
|
int |
getNumber()
return the star's number Creation date: (30/04/2001 11:53:22 AM) |
int |
getSize()
|
int |
getSpectra()
|
java.lang.String |
getSpectralType()
Return the star spectra as a string. |
java.lang.String |
getStarSize()
Return the star size as a string. |
double |
getSurveyDate()
|
int |
getSystem()
|
Star[] |
getSystemStars()
Returns all the stars in this star's system (including this star). |
boolean |
isMulti()
|
boolean |
isSurveyed()
|
void |
setBodies(java.util.List newBodies)
|
void |
setDist(int dist)
|
void |
setMulti(int multi)
|
static void |
setNumberOfSystems(int n)
|
void |
setSize(int size)
|
void |
setSpectra(int spectra)
|
void |
setSurveyDate(double newSurveyDate)
|
void |
setSurveyed(boolean newSurveyed)
|
void |
setSystem(int system)
|
static void |
setSystemSize(int system,
int x,
int y,
int z,
int size)
|
java.lang.String |
toString()
|
Methods inherited from class com.pegacat.vcf.data.VoyagerObject |
getLocation, getName, getNamedPosition, getText, getX, getY, getZ |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int spectra
protected int size
protected int multi
protected int dist
protected int number
protected int system
protected boolean surveyed
protected double surveyDate
protected java.util.List bodies
note that the bodies *can* exist without a star survey, in which case they will be randomly sorted, but unsurveyed worlds will not have entries.
protected static com.pegacat.vcf.data.StarSystem[] systemList
Constructor Detail |
public Star(int number, int x, int y, int z)
Method Detail |
public static void setNumberOfSystems(int n)
public static void setSystemSize(int system, int x, int y, int z, int size)
public static void addStarToSystem(int system, Star star)
public void setSpectra(int spectra)
public void setSize(int size)
public void setMulti(int multi)
public void setDist(int dist)
public void setSystem(int system)
public int getSpectra()
public int getSize()
public int getMulti()
public int getDist()
public int getSystem()
public boolean isMulti()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getSpectralType()
public java.lang.String getStarSize()
public java.lang.String getDistance()
public Star[] getSystemStars()
public int getNumber()
public boolean isSurveyed()
public void setSurveyed(boolean newSurveyed)
public java.util.List getBodies()
public Body getBody(java.lang.String name)
name
- string of form 123A or 123A1public double getSurveyDate()
public void setBodies(java.util.List newBodies)
public void setSurveyDate(double newSurveyDate)
public double distanceFrom(Star other)
other
- com.pegacat.vcf.data.Star
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |