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

Last change on this file since 13257 was 9246, checked in by Don-vip, 8 years ago

javadoc update

  • 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 * @param <T> type of items
34 *
35 * @param key the key whose associated value is to be returned
36 * @return the Collection value to which the specified key is mapped,
37 * or {@code null} if this map contains no Collection mapping for the key
38 * @since 5502
39 */
40 <T> Collection<T> getCollection(String key);
41
42 /**
43 * Put a key / value pair as a new attribute.
44 *
45 * Overrides key / value pair with the same key (if present).
46 *
47 * @param key the key
48 * @param value the value
49 */
50 void put(String key, Object value);
51
52 /**
53 * Add a key / value pair that is not part of the GPX schema as an extension.
54 *
55 * @param key the key
56 * @param value the value
57 */
58 void addExtension(String key, String value);
59
60}
Note: See TracBrowser for help on using the repository browser.