source: josm/trunk/src/org/openstreetmap/josm/data/gpx/IWithAttributes.java@ 7518

Last change on this file since 7518 was 7518, checked in by Don-vip, 10 years ago

fix #10489 - Add additional attributes to GPX Export for nodes + GPX code improvements

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.gpx;
3
4import java.util.Collection;
5
6/**
7 * Object with attributes (in the context of GPX data).
8 */
9public interface IWithAttributes {
10
11 /**
12 * Returns the Object value to which the specified key is mapped,
13 * or {@code null} if this map contains no mapping for the key.
14 *
15 * @param key the key whose associated value is to be returned
16 * @return the value
17 */
18 Object get(String key);
19
20 /**
21 * Returns the String value to which the specified key is mapped,
22 * or {@code null} if this map contains no String mapping for the key.
23 *
24 * @param key the key whose associated value is to be returned
25 * @return the String value to which the specified key is mapped,
26 * or {@code null} if this map contains no String mapping for the key
27 */
28 String getString(String key);
29
30 /**
31 * Returns the Collection value to which the specified key is mapped,
32 * or {@code null} if this map contains no Collection mapping for the key.
33 *
34 * @param key the key whose associated value is to be returned
35 * @return the Collection value to which the specified key is mapped,
36 * or {@code null} if this map contains no Collection mapping for the key
37 * @since 5502
38 */
39 <T> Collection<T> getCollection(String key);
40
41 /**
42 * Put a key / value pair as a new attribute.
43 *
44 * Overrides key / value pair with the same key (if present).
45 *
46 * @param key the key
47 * @param value the value
48 */
49 void put(String key, Object value);
50
51 /**
52 * Add a key / value pair that is not part of the GPX schema as an extension.
53 *
54 * @param key the key
55 * @param value the value
56 */
57 void addExtension(String key, String value);
58
59}
Note: See TracBrowser for help on using the repository browser.