|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--universe.common.database.DBItem | +--universe.server.database.PlanetBase
Field Summary | |
private static PlanetID |
currentID
|
private java.util.Vector |
fleetsInOrbit
|
private java.util.Vector |
GroundStationList
|
private PlanetID |
ID
|
private SimpleAccrete.PlanetaryMakeup |
makeup
|
private java.lang.String |
name
|
private static java.text.NumberFormat |
ourNumberFormat
|
private CivID |
owner
|
private PlanetID |
planetaryPrimaryID
|
private int |
starIndex
|
private SystemID |
SystemMember
|
Constructor Summary | |
protected |
PlanetBase()
This constructor is used to create a special "undefined" planet instance. |
protected |
PlanetBase(SystemID SID,
int starIndex,
java.lang.String in_name,
SimpleAccrete.PlanetaryMakeup pm)
This is the designated constructor for instances of this class/ It creates a new instance of a planet in the given star system, orbiting the given star in that system, and having the given name. |
Method Summary | |
java.util.Vector |
getFleetsInOrbit()
This method returns the IDs of all fleets currently in orbit around the planet. |
java.lang.String |
getGravityString()
This method returns a string representing the gravity of the planet. |
java.util.Vector |
getGroundStationList()
This method adds the given ground station to those present on the planet. |
PlanetID |
getID()
|
Index |
getIndex()
|
java.lang.String |
getName()
|
CivID |
getOwner()
Returns the ID of the civ who is considered the owner of the planet (i.e. |
PlanetID |
getPlanetaryPrimaryID()
This method returns the ID of the planetary body which the receiving instance is orbiting. |
SimpleAccrete.PlanetaryMakeup |
getPlanetMakeup()
This method returns the planetary make-up of the receiving instance. |
java.lang.String |
getRadiusString()
This method returns a string representing the radius of the planet. |
int |
getStarIndex()
Returns the index of the star within the planet's system that the planet is orbiting. |
SystemID |
getSystemID()
|
java.lang.String |
getTemperatureString()
This method returns a string representing the temperature of the planet. |
boolean |
isInhabited()
This method returns true if the receiving planet instance is populated, and false otherwise. |
boolean |
isMoon()
This method returns true if the receiving instance represents a moon orbiting another planetary body. |
void |
setName(java.lang.String new_name)
|
void |
setOwner(CivID newOwner)
This method sets the owner of the planet to be the civ with the given ID. |
void |
setPlanetaryPrimaryID(PlanetID newValue)
This method sets the ID of the planetary body which the receiving instance is orbiting. |
void |
setPlanetMakeup(SimpleAccrete.PlanetaryMakeup pm)
This method sets the planetary make-up of the receiving instance to the given value. |
void |
setStarIndex(int newValue)
Sets the index of the star within the plane'ts system that the planet is orbiting. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static PlanetID currentID
private static java.text.NumberFormat ourNumberFormat
private PlanetID ID
private SystemID SystemMember
private java.util.Vector GroundStationList
private SimpleAccrete.PlanetaryMakeup makeup
private java.lang.String name
private CivID owner
private int starIndex
private PlanetID planetaryPrimaryID
private java.util.Vector fleetsInOrbit
Constructor Detail |
protected PlanetBase(SystemID SID, int starIndex, java.lang.String in_name, SimpleAccrete.PlanetaryMakeup pm)
SID
- The unique ID of the star syste to which the planet is being added.starIndex
- The index of the star within that system which the planet is orbiting.in_name
- The name to be assigned to the planet.protected PlanetBase()
Method Detail |
public PlanetID getID()
public Index getIndex()
getIndex
in class DBItem
in the subclasses for a typed version.
public java.lang.String getName()
getName
in class DBItem
public void setName(java.lang.String new_name)
public SystemID getSystemID()
public CivID getOwner()
public void setOwner(CivID newOwner)
newOwner
- The unique ID of the new owner.SystemBase.planetChangedOwner( PlanetID aPlanetID, CivID newPlanetOwner )
public java.util.Vector getGroundStationList()
public boolean isInhabited()
public SimpleAccrete.PlanetaryMakeup getPlanetMakeup()
public void setPlanetMakeup(SimpleAccrete.PlanetaryMakeup pm)
pm
- The new planetary make-up to be assigned to
to the planet.#getPlanetType()
public int getStarIndex()
public void setStarIndex(int newValue)
public boolean isMoon()
getPlanetaryPrimaryID()
,
setPlanetaryPrimaryID( PlanetID newValue )
public void setPlanetaryPrimaryID(PlanetID newValue)
newValue
- The ID of the planetary body which this body is orbiting.isMoon()
,
getPlanetaryPrimaryID()
public PlanetID getPlanetaryPrimaryID()
isMoon()
,
setPlanetaryPrimaryID( PlanetID newValue )
public java.util.Vector getFleetsInOrbit()
public java.lang.String getRadiusString()
public java.lang.String getGravityString()
public java.lang.String getTemperatureString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |