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