001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.gpx;
003
004import java.util.Collection;
005import java.util.Map;
006
007import org.openstreetmap.josm.data.Bounds;
008
009/**
010 * Read-only gpx track. Implementations doesn't have to be immutable, but should always be thread safe.
011 * @since 444
012 */
013public interface GpxTrack extends IWithAttributes {
014
015    /**
016     * Returns the track segments.
017     * @return the track segments
018     */
019    Collection<GpxTrackSegment> getSegments();
020
021    /**
022     * Returns the track attributes.
023     * @return the track attributes
024     */
025    Map<String, Object> getAttributes();
026
027    /**
028     * Returns the track bounds.
029     * @return the track bounds
030     */
031    Bounds getBounds();
032
033    /**
034     * Returns the track length.
035     * @return the track length
036     */
037    double length();
038
039    /**
040     * Returns the number of times this track has been changed.
041     * @return Number of times this track has been changed. Always 0 for read-only tracks
042     */
043    int getUpdateCount();
044}