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

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

fix #16796 - Rework of GPX track colors / layer preferences (patch by Bjoeni)

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