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
17   * Onderzoek TNO (TNO), Erasmus University Rotterdam, Delft University of Technology, Panteia B.V., Stichting Projecten
18   * Binnenvaart, Ab Ovo Nederland B.V., Modality Software Solutions B.V., and Rijkswaterstaat - Dienst Water, Verkeer en
19   * Leefomgeving, including the right to sub-license sources and derived products to third parties. <br>
20   * 
21   * @version Sep 28, 2012 <br>
22   * @author <a href="http://tudelft.nl/averbraeck">Alexander Verbraeck </a>
23   */
24  public class StudyArea implements Serializable
25  {
26      /** */
27      private static final long serialVersionUID = 1L;
28  
29      /** code to identify the study area */
30      private String code;
31  
32      /** the terminals in / for this sailing area */
33      private List<Terminal> terminals = new ArrayList<Terminal>();
34  
35      /**
36       * @param code code
37       */
38      public StudyArea(final String code)
39      {
40          this.code = code;
41      }
42  
43      /**
44       * @param terminal terminal
45       */
46      public void addTerminal(final Terminal terminal)
47      {
48          this.terminals.add(terminal);
49      }
50  
51      /**
52       * @return the code
53       */
54      public String getCode()
55      {
56          return this.code;
57      }
58  
59      /**
60       * @return the terminals
61       */
62      public List<Terminal> getTerminals()
63      {
64          return this.terminals;
65      }
66  
67      /**
68       * @see java.lang.Object#toString()
69       */
70      @Override
71      public String toString()
72      {
73          return "StudyArea " + this.code;
74      }
75  
76  }