-package edu.berkeley.fleet.marina;
-import edu.berkeley.fleet.api.*;
-import edu.berkeley.fleet.two.*;
-import edu.berkeley.fleet.*;
-import java.util.*;
-
-public class MarinaFleet extends FleetTwoFleet {
-
- MarinaShip fakeShip = new MarinaShip(this);
- MarinaDock onlyDock = new MarinaDock(fakeShip, true);
-
- public MarinaFleet() {
- // use "internal encoding"
- super(true);
- }
-
- public BitVector encodeInstruction(Dock dispatchFrom, Instruction instruction) {
- return encodeInstruction(instruction, dispatchFrom);
- }
-
- public Iterator<Ship> iterator() {
- HashSet hs = new HashSet<Ship>();
- hs.add(fakeShip);
- return hs.iterator();
- }
-
- public Ship getShip(String type, int ordinal) {
- throw new RuntimeException("not implemented");
- }
-
- public FleetProcess run(Instruction[] instructions) {
- throw new RuntimeException("not implemented");
- }
-
- public BitVector getDestAddr(Path path) {
- if (path==null) return new BitVector(0);
- return ((MarinaPath)path).bv;
- }
-
- public Dock getOnlyDock() {
- return onlyDock;
- }
-}