View Javadoc
1   /**
2    * 
3    */
4   package org.opentrafficsim.water.network;
5   
6   import java.io.Serializable;
7   import java.util.ArrayList;
8   import java.util.List;
9   
10  import org.opentrafficsim.water.transfer.Terminal;
11  
12  /**
13   * <br>
14   * Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving. All rights reserved. <br>
15   * Some parts of the software (c) 2011-2013 TU Delft, Faculty of TBM, Systems and Simulation <br>
16   * This software is licensed without restrictions to Nederlandse Organisatie voor Toegepast Natuurwetenschappelijk Onderzoek TNO
17   * (TNO), Erasmus University Rotterdam, Delft University of Technology, Panteia B.V., Stichting Projecten Binnenvaart, Ab Ovo
18   * Nederland B.V., Modality Software Solutions B.V., and Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving, including the
19   * right to sub-license sources and derived products to third parties. <br>
20   * @version Sep 28, 2012 <br>
21   * @author <a href="http://tudelft.nl/averbraeck">Alexander Verbraeck </a>
22   */
23  public class StudyArea implements Serializable
24  {
25      /** */
26      private static final long serialVersionUID = 1L;
27  
28      /** code to identify the study area */
29      private String code;
30  
31      /** the terminals in / for this sailing area */
32      private List<Terminal> terminals = new ArrayList<Terminal>();
33  
34      /**
35       * @param code String; code
36       */
37      public StudyArea(final String code)
38      {
39          this.code = code;
40      }
41  
42      /**
43       * @param terminal Terminal; terminal
44       */
45      public void addTerminal(final Terminal terminal)
46      {
47          this.terminals.add(terminal);
48      }
49  
50      /**
51       * @return the code
52       */
53      public String getCode()
54      {
55          return this.code;
56      }
57  
58      /**
59       * @return the terminals
60       */
61      public List<Terminal> getTerminals()
62      {
63          return this.terminals;
64      }
65  
66      /**
67       * @see java.lang.Object#toString()
68       */
69      @Override
70      public String toString()
71      {
72          return "StudyArea " + this.code;
73      }
74  
75  }