edu.berkeley.fleet.api
Class Ship

Object
  extended by Ship
All Implemented Interfaces:
Iterable<Dock>

public abstract class Ship
extends Object
implements Iterable<Dock>

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

Ship

public Ship(Fleet fleet)
Method Detail

getFleet

public Fleet getFleet()
return the Fleet that this Ship belongs to


getType

public abstract String getType()
returns the type of the ship ("Fetch", "Alu", etc)


iterator

public abstract Iterator<Dock> iterator()
Specified by:
iterator in interface Iterable<Dock>

getDock

public abstract Dock getDock(String name)
returns the dock on this ship having name "name"


getOrdinal

public abstract int getOrdinal()
the docks of a given type are numbered; this returns the ordinal number of this dock


getConstant

public BitVector getConstant(String constantName)
get a constant associated with a ship; returns null if none found


toString

public String toString()
Overrides:
toString in class Object