1 package edu.berkeley.fleet.api;
4 public abstract class BenkoBox extends Destination {
6 /** you should extend subclasses, not this class directly */
10 /** the descriptive name of this benkobox (relative to its ship) */
11 public abstract String getName();
13 /** return the Ship to which this BenkoBox belongs */
14 public abstract Ship getShip();
16 /** the maximum number of instructions we can put in the BenkoBox instruction fifo,
17 * or Integer.MAX_VALUE if unbounded */
18 public abstract int getInstructionFifoLength();
20 public static abstract class Inbox extends BenkoBox {
24 public static abstract class Outbox extends BenkoBox {
28 /** get all destinations associated with this BenkoBox */
29 public Iterable<Destination> getDestinations() {
30 HashSet<Destination> self = new HashSet<Destination>();