Package org.openstreetmap.josm.data.gpx
Class WithAttributes
java.lang.Object
org.openstreetmap.josm.data.gpx.WithAttributes
- All Implemented Interfaces:
GpxConstants,IWithAttributes
- Direct Known Subclasses:
GpxData,GpxExtension,GpxRoute,GpxTrack,GpxTrackSegment,WayPoint
Default implementation for IWithAttributes.
Base class for various classes in the GPX model.
- Since:
- 444
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.openstreetmap.josm.data.gpx.GpxConstants
GpxConstants.ColorFormat -
Field Summary
FieldsModifier and TypeFieldDescriptionThe "attr" hash is used to store the XML payload (not only XML attributes!)private GpxExtensionCollectionThe "exts" collection contains all extensions.Fields inherited from interface org.openstreetmap.josm.data.gpx.GpxConstants
EXTENSION_ABBREVIATIONS, FIX_VALUES, GARMIN_COLORS, GPX_CMT, GPX_DESC, GPX_NAME, GPX_PREFIX, GPX_SRC, JOSM_CREATOR_NAME, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_COURSE, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_STD_HDEV, PT_STD_VDEV, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, RTKLIB_AGE, RTKLIB_Q, RTKLIB_RATIO, RTKLIB_SDE, RTKLIB_SDEU, RTKLIB_SDN, RTKLIB_SDNE, RTKLIB_SDU, RTKLIB_SDUN, WPT_KEYS, XML_URI_EXTENSIONS_DRAWING, XML_URI_EXTENSIONS_GARMIN, XML_URI_EXTENSIONS_JOSM, XML_URI_XSD, XML_XSD_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_GARMIN, XML_XSD_EXTENSIONS_JOSM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the Object value to which the specified key is mapped, ornullif this map contains no mapping for the key.Returns the attributes<T> Collection<T>getCollection(String key) Returns the Collection value to which the specified key is mapped, ornullif this map contains no Collection mapping for the key.Returns the extensionsReturns the String value to which the specified key is mapped, ornullif this map contains no String mapping for the key.booleanReturns whether theGpxExtensionCollectioninstance has been created yet, should be overridden.inthashCode()voidPut a key / value pair as a new attribute.
-
Field Details
-
attr
The "attr" hash is used to store the XML payload (not only XML attributes!) -
exts
The "exts" collection contains all extensions.
-
-
Constructor Details
-
WithAttributes
public WithAttributes()
-
-
Method Details
-
get
Returns the Object value to which the specified key is mapped, ornullif this map contains no mapping for the key.- Specified by:
getin interfaceIWithAttributes- Parameters:
key- the key whose associated value is to be returned- Returns:
- the value
-
getString
Returns the String value to which the specified key is mapped, ornullif this map contains no String mapping for the key.- Specified by:
getStringin interfaceIWithAttributes- Parameters:
key- the key whose associated value is to be returned- Returns:
- the String value to which the specified key is mapped,
or
nullif this map contains no String mapping for the key
-
getCollection
Returns the Collection value to which the specified key is mapped, ornullif this map contains no Collection mapping for the key.- Specified by:
getCollectionin interfaceIWithAttributes- Type Parameters:
T- type of items- Parameters:
key- the key whose associated value is to be returned- Returns:
- the Collection value to which the specified key is mapped,
or
nullif this map contains no Collection mapping for the key - Since:
- 5502
-
put
Put a key / value pair as a new attribute. Overrides key / value pair with the same key (if present).- Specified by:
putin interfaceIWithAttributes- Parameters:
key- the keyvalue- the value
-
getAttributes
Description copied from interface:IWithAttributesReturns the attributes- Specified by:
getAttributesin interfaceIWithAttributes- Returns:
- the attributes
-
hasExtensions
Description copied from interface:IWithAttributesReturns whether theGpxExtensionCollectioninstance has been created yet, should be overridden. The instance will usually be created on first call ofIWithAttributes.getExtensions().- Specified by:
hasExtensionsin interfaceIWithAttributes- Returns:
- whether the
GpxExtensionCollectioninstance has been created yet
-
getExtensions
Description copied from interface:IWithAttributesReturns the extensions- Specified by:
getExtensionsin interfaceIWithAttributes- Returns:
- the extensions
-
hashCode
-
equals
-