ObjectShip
public abstract class Ship
A ship in a Fleet; each ship consists of a collection of Docks
| Constructor Summary | |
|---|---|
Ship(Fleet fleet)
|
|
| Method Summary | |
|---|---|
BitVector |
getConstant(String constantName)
get a constant associated with a ship; returns null if none found |
abstract Dock |
getDock(String name)
returns the dock on this ship having name "name" |
Fleet |
getFleet()
return the Fleet that this Ship belongs to |
abstract int |
getOrdinal()
the docks of a given type are numbered; this returns the ordinal number of this dock |
abstract String |
getType()
returns the type of the ship ("Fetch", "Alu", etc) |
abstract Iterator<Dock> |
iterator()
|
String |
toString()
|
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Ship(Fleet fleet)
| Method Detail |
|---|
public Fleet getFleet()
public abstract String getType()
public abstract Iterator<Dock> iterator()
iterator in interface Iterable<Dock>public abstract Dock getDock(String name)
public abstract int getOrdinal()
public BitVector getConstant(String constantName)
public String toString()
toString in class Object