Package org.openstreetmap.josm.data.gpx
Interface IWithAttributes
- All Known Subinterfaces:
IGpxTrack,IGpxTrackSegment
- All Known Implementing Classes:
GpxData,GpxExtension,GpxRoute,GpxTrack,GpxTrackSegment,WayPoint,WithAttributes
public interface IWithAttributes
Object with attributes (in the context of GPX data).
-
Method Summary
Modifier and TypeMethodDescriptionReturns 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.default booleanReturns whether theGpxExtensionCollectioninstance has been created yet, should be overridden.voidPut a key / value pair as a new attribute.
-
Method Details
-
get
Returns the Object value to which the specified key is mapped, ornullif this map contains no mapping for the key.- 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.- 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.- 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).- Parameters:
key- the keyvalue- the value
-
getAttributes
Returns the attributes- Returns:
- the attributes
-
hasExtensions
Returns whether theGpxExtensionCollectioninstance has been created yet, should be overridden. The instance will usually be created on first call ofgetExtensions().- Returns:
- whether the
GpxExtensionCollectioninstance has been created yet
-
getExtensions
Returns the extensions- Returns:
- the extensions
-