|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.gjt.universe.DBItem | +--org.gjt.universe.ShipBase
This class represents one ship. Particulars about the ship like the crew and damage will be stored in this object (or a subclass.) See subclasses for more specifics. Information like location is stored in the fleet that the ship is a member.
FleetBase
,
Serialized FormField Summary | |
private static ShipID |
currentID
|
private ShipDesignID |
design
|
private FleetID |
fleet
|
private ShipID |
ID
|
private java.lang.String |
name
|
private CivID |
owner
|
Constructor Summary | |
protected |
ShipBase()
This constructor makes an undefined ship object. |
protected |
ShipBase(ShipDesignID SDID,
CivID AID,
java.lang.String in_name)
This constructor makes a ship object. |
Method Summary | |
abstract boolean |
build()
|
boolean |
colonize(PlanetID PID)
|
void |
destroy()
This method destroys the ship. |
abstract AttackBase |
getAttack()
|
abstract DefenseBase |
getDefense()
|
FleetID |
getFleet()
Returns the fleet that this ship is a member. |
ShipID |
getID()
Returns the ID of the ship. |
Index |
getIndex()
See getID() in the subclasses for a typed version. |
java.lang.String |
getName()
Returns the name of this ship. |
CivID |
getOwner()
Returns the owner (civ) of this ship. |
ShipDesignID |
getShipDesign()
Returns the ship design of this ship. |
abstract SpeedBase |
getSpeed()
Returns the speed of the ship. |
boolean |
isColonizable()
|
void |
setFleet(FleetID FID)
Sets the fleet this ship is a member. |
void |
setName(java.lang.String new_name)
Sets the name of the ship. |
Methods inherited from class org.gjt.universe.DBItem |
getLocation, specificDisplayDebug |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static ShipID currentID
private ShipID ID
private ShipDesignID design
private FleetID fleet
private CivID owner
private java.lang.String name
Constructor Detail |
protected ShipBase(ShipDesignID SDID, CivID AID, java.lang.String in_name)
SDID
- Ship design of this ship.AID
- owner of this ship.in_name
- name of this ship.protected ShipBase()
Method Detail |
public ShipID getID()
public Index getIndex()
DBItem
getIndex
in class DBItem
public java.lang.String getName()
getName
in class DBItem
public void setName(java.lang.String new_name)
public CivID getOwner()
getOwner
in class DBItem
public ShipDesignID getShipDesign()
public void setFleet(FleetID FID)
public FleetID getFleet()
public abstract AttackBase getAttack()
public abstract DefenseBase getDefense()
public abstract SpeedBase getSpeed()
public abstract boolean build()
public boolean isColonizable()
public boolean colonize(PlanetID PID)
public void destroy()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |