com.oziexplorer
Class TrackPoint

java.lang.Object
  extended by com.oziexplorer.TrackPoint

public class TrackPoint
extends Object

This class represents track points.

Copyright 2011 Alan Burlison, . All rights reserved. Use is subject to license terms, see LICENSE.txt.
SourceForge.net


Field Summary
protected  double altitude
          The altitude of the track point.
protected  Calendar date
          The date the track point was created.
protected  boolean newSection
          True if the track point starts a new section.
protected  Position position
          The position of the track point.
 
Constructor Summary
TrackPoint(boolean newSection, Position position)
          Create a new track point with an unknown altitude and the current date.
TrackPoint(boolean newSection, Position position, double altitude)
          Create a new track point with a known altitude and the current date.
TrackPoint(boolean newSection, Position position, double altitude, Calendar date)
          Create a new track point.
 
Method Summary
 boolean equals(Object that)
          Test if two track points are equal.
 double getAltitude()
          Retrieve the track point altitude.
 Calendar getDate()
          Retrieve the track point date.
 Position getPosition()
          Retrieve the track point position.
 int hashCode()
          Return the hash code for this object.
 boolean isNewSection()
          Return true if the point starts a new track section.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newSection

protected final boolean newSection
True if the track point starts a new section.


position

protected final Position position
The position of the track point.


altitude

protected final double altitude
The altitude of the track point. OziAPI.UNKALT for unknown.


date

protected final Calendar date
The date the track point was created.

Constructor Detail

TrackPoint

public TrackPoint(boolean newSection,
                  Position position,
                  double altitude,
                  Calendar date)
Create a new track point.

Parameters:
newSection - True if the track point starts a new section.
position - the position of the track point.
altitude - altitude of the track point, or OziAPI.UNKALT.
date - creation date of the waypoint.

TrackPoint

public TrackPoint(boolean newSection,
                  Position position,
                  double altitude)
Create a new track point with a known altitude and the current date.

Parameters:
newSection - True if the track point starts a new section.
position - position of the track point.
altitude - altitude of the track point, or OziAPI.UNKALT.

TrackPoint

public TrackPoint(boolean newSection,
                  Position position)
Create a new track point with an unknown altitude and the current date.

Parameters:
newSection - True if the track point starts a new section.
position - position of the track point.
Method Detail

equals

public boolean equals(Object that)
Test if two track points are equal. The position, altitude and date are compared.

Overrides:
equals in class Object
Parameters:
that - the object to compare against.
Returns:
true if the objects are equal.

hashCode

public int hashCode()
Return the hash code for this object.

Overrides:
hashCode in class Object
Returns:
the hash code for this object.

isNewSection

public boolean isNewSection()
Return true if the point starts a new track section.

Returns:
true if the point starts a new track section.

getPosition

public Position getPosition()
Retrieve the track point position.

Returns:
the track point position.

getAltitude

public double getAltitude()
Retrieve the track point altitude.

Returns:
the track point altitude.

getDate

public Calendar getDate()
Retrieve the track point date.

Returns:
the track point date.