com.c5corp.c5gps
Class RoutePoint

java.lang.Object
  extended by com.c5corp.c5gps.GpsType
      extended by com.c5corp.c5gps.GpsPointRecord
          extended by com.c5corp.c5gps.WayPoint
              extended by com.c5corp.c5gps.RoutePoint

public class RoutePoint
extends WayPoint

RoutePoints are simply WayPoints with an order field; a reference to a Vector that is the containing object for this collection of RoutePoints, which defines the GPS Route. routes consist of ordered RoutePoints.

Since:
2.0
Author:
Brett Stalbaum Copyright 2002-2006 see LICENSE.txt and UCSD_LICENSE.txt

Field Summary
 
Fields inherited from class com.c5corp.c5gps.GpsType
hdatum
 
Constructor Summary
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, java.util.Calendar date, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, and UTM northing.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, int altitude, java.util.Calendar date, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, UTM northing, and altitude.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, int altitude, int month, int day, int year, int hour, int minute, int second, int timeZoneOffset, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, int month, int day, int year, int hour, int minute, int second, int timeZoneOffset, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, int altitude, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, UTM northing, and altitude.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, int easting, int northing, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, and UTM northing.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, java.util.Calendar date, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, zone Char, UTM easting, UTM northing and Calendar.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, int altitude, java.util.Calendar date, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, and java.util.Calendar object.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, int altitude, int month, int day, int year, int hour, int minute, int second, int timeZoneOffset, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, int month, int day, int year, int hour, int minute, int second, int timeZoneOffset, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, int altitude, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone char, UTM easting, UTM northing, and altitude.
RoutePoint(java.lang.String datum, java.lang.String name, int zoneNum, java.lang.String zoneChar, int easting, int northing, java.util.Vector<RoutePoint> order)
          Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, zone Char, UTM easting, and UTM northing.
 
Method Summary
 int getPosition()
          this RoutePoint object's order (zero based index) in the Vector returned by getRoutePointsOrdered()
 java.lang.String getRoutePointName()
          gets the name of this WayRoutePoint
 void setOrder(java.util.Vector<RoutePoint> order)
          Sets a reference to the Vector containing this.
 java.lang.String toString()
          override toString()
 
Methods inherited from class com.c5corp.c5gps.WayPoint
equals, getAltitude, getDate, getDatum, getEasting, getNorthing, getType, getUtmCoordinatePairElev, getVersion, getWayPointName, getZone, getZoneChar, getZoneOffset, setAltitude, setDate, setDatum, setEasting, setNorthing, setTimeToGmt, setVersion, setWaypointName, setZoneNum, setZoneNum
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  int altitude,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone char, UTM easting, UTM northing, and altitude. Uses a default date, local system time.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, zone Char, UTM easting, and UTM northing. Uses a default date, local system time.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  int altitude,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, UTM northing, and altitude. Uses a default date, local system time.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, and UTM northing. Uses a default date, local system time.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  int altitude,
                  java.util.Calendar date,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, and java.util.Calendar object.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
date - a java.util.Calendar representing date and time
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  java.util.Calendar date,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, zone Char, UTM easting, UTM northing and Calendar. The Calendar passed into this object can be modified to GMT with setTimeToGmt().

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
date -
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered(), WayPoint.setTimeToGmt()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  int altitude,
                  java.util.Calendar date,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, UTM northing, and altitude. The Calendar passed into this object can be modified to GMT with setTimeToGmt().

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
date - a java.util.Calendar representing date and time
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered(), WayPoint.setTimeToGmt()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  java.util.Calendar date,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters, zone number, UTM easting, and UTM northing. The Calendar passed into this object can be modified to GMT with setTimeToGmt().

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
date - a java.util.Calendar representing date and time
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered(), WayPoint.setTimeToGmt()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  int altitude,
                  int month,
                  int day,
                  int year,
                  int hour,
                  int minute,
                  int second,
                  int timeZoneOffset,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset. Using the time zone offset, the internal Calendar will be converted to GMT.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
month - - month
day - - day
year - - year
hour - - hour
minute - - minute
second - - second
timeZoneOffset - - time zone offset
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  int altitude,
                  int month,
                  int day,
                  int year,
                  int hour,
                  int minute,
                  int second,
                  int timeZoneOffset,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset. Using the time zone offset, the internal Calendar will be converted to GMT.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
altitude - Altitude of the RoutePoint
month - - month
day - - day
year - - year
hour - - hour
minute - - minute
second - - second
timeZoneOffset - - time zone offset
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  int easting,
                  int northing,
                  int month,
                  int day,
                  int year,
                  int hour,
                  int minute,
                  int second,
                  int timeZoneOffset,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset. Using the time zone offset, the internal Calendar will be converted to GMT.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
easting - UTM easting
northing - UTM northing
month - - month
day - - day
year - - year
hour - - hour
minute - - minute
second - - second
timeZoneOffset - - time zone offset
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()

RoutePoint

public RoutePoint(java.lang.String datum,
                  java.lang.String name,
                  int zoneNum,
                  java.lang.String zoneChar,
                  int easting,
                  int northing,
                  int month,
                  int day,
                  int year,
                  int hour,
                  int minute,
                  int second,
                  int timeZoneOffset,
                  java.util.Vector<RoutePoint> order)
Construct a RoutePoint with a name (which will be truncated to 255 characters), zone number, zone Char, UTM easting, UTM northing, altitude, month, day, year, hour, minute, second, and a time zone offset. Using the time zone offset, the internal Calendar will be converted to GMT.

Parameters:
datum - - a string representing the datum - an empty string will default this to the configured database install
name - Waypoint name, up to 255 chars
zoneNum - UTM zone number
zoneChar - UTM grid zone designation character (GZD)
easting - UTM easting
northing - UTM northing
month - - month
day - - day
year - - year
hour - - hour
minute - - minute
second - - second
timeZoneOffset - - time zone offset
order - a java.util.Vector to which this object will add itself
See Also:
WayPoint, getRoutePointsOrdered()
Method Detail

getRoutePointName

public java.lang.String getRoutePointName()
gets the name of this WayRoutePoint

Returns:
the RoutePointName

setOrder

public void setOrder(java.util.Vector<RoutePoint> order)
Sets a reference to the Vector containing this. Refer to the constructors. This can be necessary when ungrouping a Vector of RoutePoints. You can also use it to monkey wrench your Route, so be careful.

Parameters:
order - a Vector of RoutePoints to be this RoutePoints ordering Vector
See Also:
getRoutePointsOrdered()

getPosition

public int getPosition()
this RoutePoint object's order (zero based index) in the Vector returned by getRoutePointsOrdered()

Returns:
his RoutePoint object's order in the ordering Vector

toString

public java.lang.String toString()

override toString()

Overrides:
toString in class WayPoint