View Javadoc
1   package org.opentrafficsim.road.network.factory.osm;
2   
3   import java.io.Serializable;
4   
5   /**
6    * <p>
7    * Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
8    * BSD-style license. See <a href="http://opentrafficsim.org/docs/license.html">OpenTrafficSim License</a>.
9    * <p>
10   * $LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, @version $Revision: 1155 $, by $Author: averbraeck $,
11   * initial version 31 dec. 2014 <br>
12   * @author <a>Moritz Bergmann</a>
13   */
14  public class OSMTag implements Serializable
15  {
16      /** */
17      private static final long serialVersionUID = 20141231L;
18  
19      /** The (not necessarily unique) Key of the tag. */
20      private final String key;
21  
22      /** The value of the tag. */
23      private final String value;
24  
25      /**
26       * Retrieve the value of this OSMTag.
27       * @return String; the value of this OSMTag
28       */
29      public final String getValue()
30      {
31          return this.value;
32      }
33  
34      /**
35       * Retrieve the key of this OSMTag.
36       * @return String; the key of this OSMTag
37       */
38      public final String getKey()
39      {
40          return this.key;
41      }
42  
43      /**
44       * Construct a new OSMTag.
45       * @param key String; the key of the new OSMTag
46       * @param value String; the value of the new OSMTag
47       */
48      public OSMTag(final String key, final String value)
49      {
50          this.key = key;
51          this.value = value;
52      }
53  
54      /** {@inheritDoc} */
55      @Override
56      public final String toString()
57      {
58          return "Tag: Key: " + this.key + " Value: " + this.value;
59      }
60  
61  }