1 package edu.berkeley.fleet.doc;
6 public class BenkoBoxDescription implements Iterable<String> {
8 public String getName() { return name; }
9 public boolean isInbox() { return inbox; }
10 public boolean isOutbox() { return !inbox; }
11 public boolean tokensOnly() { return tokenOnly; }
12 public String getShortcut() { return shortcut; }
13 public Iterator<String> iterator() { return destinations.iterator(); }
15 // private //////////////////////////////////////////////////////////////////////////////
17 private final ShipDescription ship;
18 private final String shortcut;
19 private final String name;
20 private final boolean inbox;
21 private final boolean tokenOnly;
22 private ArrayList<String> destinations = new ArrayList<String>();
24 BenkoBoxDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox) {
25 this(ship, name, tokenOnly, inbox, null);
27 BenkoBoxDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox, String shortcut) {
31 this.tokenOnly = tokenOnly;
32 this.shortcut = shortcut;
36 void addDest(String dest) { destinations.add(dest); }