public class WithAttributes extends Object implements IWithAttributes, GpxConstants
| Modifier and Type | Field and Description |
|---|---|
Map<String,Object> |
attr
The "attr" hash is used to store the XML payload (not only XML attributes!)
|
JOSM_EXTENSIONS_NAMESPACE_URI, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_EXTENSIONS, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, WPT_KEYS| Constructor and Description |
|---|
WithAttributes() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(String key,
String value)
Add a key / value pair that is not part of the GPX schema as an extension.
|
Object |
get(String key)
Returns the Object value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
Collection<?> |
getCollection(String key)
Returns the Collection value to which the specified key is mapped,
or
null if this map contains no Collection mapping for the key. |
String |
getString(String key)
Returns the String value to which the specified key is mapped,
or
null if this map contains no String mapping for the key. |
void |
put(String key,
Object value)
Put a key / value pair as a new attribute.
|
public WithAttributes()
public Object get(String key)
null if this map contains no mapping for the key.get in interface IWithAttributeskey - the key whose associated value is to be returnedpublic String getString(String key)
null if this map contains no String mapping for the key.getString in interface IWithAttributeskey - the key whose associated value is to be returnednull if this map contains no String mapping for the keypublic Collection<?> getCollection(String key)
null if this map contains no Collection mapping for the key.getCollection in interface IWithAttributeskey - the key whose associated value is to be returnednull if this map contains no Collection mapping for the keypublic void put(String key, Object value)
put in interface IWithAttributeskey - the keyvalue - the valuepublic void addExtension(String key, String value)
addExtension in interface IWithAttributeskey - the keyvalue - the value