public class WithAttributes extends java.lang.Object implements IWithAttributes, GpxConstants
| Modifier and Type | Field and Description |
|---|---|
java.util.Map<java.lang.String,java.lang.Object> |
attr
The "attr" hash is used to store the XML payload (not only XML attributes!)
|
FIX_VALUES, GPX_CMT, GPX_DESC, GPX_NAME, GPX_SRC, JOSM_EXTENSIONS_NAMESPACE_URI, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_EXTENSIONS, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, WPT_KEYS| Constructor and Description |
|---|
WithAttributes() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExtension(java.lang.String key,
java.lang.String value)
Add a key / value pair that is not part of the GPX schema as an extension.
|
java.lang.Object |
get(java.lang.String key)
Returns the Object value to which the specified key is mapped,
or
null if this map contains no mapping for the key. |
<T> java.util.Collection<T> |
getCollection(java.lang.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. |
java.lang.String |
getString(java.lang.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(java.lang.String key,
java.lang.Object value)
Put a key / value pair as a new attribute.
|
public java.util.Map<java.lang.String,java.lang.Object> attr
public WithAttributes()
public java.lang.Object get(java.lang.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 java.lang.String getString(java.lang.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 <T> java.util.Collection<T> getCollection(java.lang.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(java.lang.String key, java.lang.Object value)
put in interface IWithAttributeskey - the keyvalue - the valuepublic void addExtension(java.lang.String key, java.lang.String value)
addExtension in interface IWithAttributeskey - the keyvalue - the value