implement am26 support for constants
[fleet.git] / src / edu / berkeley / fleet / api / BenkoBox.java
1 package edu.berkeley.fleet.api;
2 import java.util.*;
3
4 public abstract class BenkoBox {
5
6     public BenkoBox() { }
7
8     /** the descriptive name of this benkobox (relative to its ship) */
9     public abstract String getName();
10
11     /** return the Ship to which this BenkoBox belongs */
12     public abstract Ship   getShip();
13
14     /** the maximum number of instructions we can put in the BenkoBox instruction fifo,
15      *  or Integer.MAX_VALUE if unbounded */
16     public abstract int getInstructionFifoLength();
17
18     /** returns true if this is an inbox */
19     public abstract boolean isInbox();
20
21     /** returns true if this is an outbox */
22     public abstract boolean isOutbox();
23
24     /** get all destinations associated with this BenkoBox; default implementation: just itself */
25     public abstract Iterable<Destination> getDestinations();
26
27     /** default implementation: the empty string */
28     public String getDestinationName() { return ""; }
29
30     /** return the BenkoBox which is the destination of this Box's shortcut (if any) */
31     public BenkoBox getShortcut() { return null; }
32
33     public abstract long resolveLiteral(String literal);
34 }