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 Iterator<String> iterator() { return destinations.iterator(); }
14 // private //////////////////////////////////////////////////////////////////////////////
16 private final ShipDescription ship;
17 private final String name;
18 private final boolean inbox;
19 private final boolean tokenOnly;
20 private ArrayList<String> destinations = new ArrayList<String>();
22 BenkoBoxDescription(ShipDescription ship, String name, boolean tokenOnly, boolean inbox) {
26 this.tokenOnly = tokenOnly;
30 void addDest(String dest) { destinations.add(dest); }