org.wamblee.gps.track
Class TrackSegmentImpl

java.lang.Object
  extended by org.wamblee.gps.track.TrackSegmentImpl
All Implemented Interfaces:
java.io.Serializable, TrackSegment

public class TrackSegmentImpl
extends java.lang.Object
implements java.io.Serializable, TrackSegment

Represents a GPS track.

Author:
Erik Brakkee
See Also:
Serialized Form

Constructor Summary
TrackSegmentImpl(java.lang.String aDescription)
          Constructs an empty track.
 
Method Summary
 void addPoint(TrackPoint aPoint)
          Adds a point to a track.
 java.lang.String getDescription()
           
 double getMaxCoordinate(int i)
           
 double getMinCoordinate(int i)
           
 Point getPoint(int aIndex)
          Gets the point at the given inded.
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrackSegmentImpl

public TrackSegmentImpl(java.lang.String aDescription)
Constructs an empty track.

Method Detail

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface TrackSegment

addPoint

public void addPoint(TrackPoint aPoint)
Adds a point to a track.

Parameters:
aPoint - Point.

size

public int size()
Specified by:
size in interface TrackSegment
Returns:
Number of points in the track.

getMinCoordinate

public double getMinCoordinate(int i)
Specified by:
getMinCoordinate in interface TrackSegment

getMaxCoordinate

public double getMaxCoordinate(int i)
Specified by:
getMaxCoordinate in interface TrackSegment

getPoint

public Point getPoint(int aIndex)
Description copied from interface: TrackSegment
Gets the point at the given inded.

Specified by:
getPoint in interface TrackSegment
Parameters:
aIndex - 0 <= aIndex < size()
Returns:
Point.


Copyright © 2010. All Rights Reserved.