com.bbn.openmap.graphicLoader.scenario
Class TimeStamp

java.lang.Object
  extended bycom.bbn.openmap.graphicLoader.scenario.TimeStamp
All Implemented Interfaces:
java.util.Comparator

public class TimeStamp
extends java.lang.Object
implements java.util.Comparator

A TimeStamp is a latitude and longitude associated with a time. The time is relative.


Field Summary
protected  float latitude
           
protected  float longitude
           
protected  long time
           
 
Constructor Summary
protected TimeStamp()
          A constructor for a TimeStamp created internally by the ScenarioPoint to be used by its TreeSet as a Comparator.
  TimeStamp(float lat, float lon, long t)
          Create a TimeStamp to be used as a position by ScenarioPoints.
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compares its two arguments for order.
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this Comparator.
 LatLonPoint getLocation()
           
 LatLonPoint getLocation(LatLonPoint llp)
           
 long getTime()
           
 void setLocation(float lat, float lon)
           
 void setLocation(LatLonPoint llp)
           
 void setTime(long t)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

latitude

protected float latitude

longitude

protected float longitude

time

protected long time
Constructor Detail

TimeStamp

protected TimeStamp()
A constructor for a TimeStamp created internally by the ScenarioPoint to be used by its TreeSet as a Comparator.


TimeStamp

public TimeStamp(float lat,
                 float lon,
                 long t)
Create a TimeStamp to be used as a position by ScenarioPoints.

Method Detail

toString

public java.lang.String toString()

setTime

public void setTime(long t)

getTime

public long getTime()

setLocation

public void setLocation(LatLonPoint llp)

setLocation

public void setLocation(float lat,
                        float lon)

getLocation

public LatLonPoint getLocation()

getLocation

public LatLonPoint getLocation(LatLonPoint llp)

compare

public int compare(java.lang.Object obj1,
                   java.lang.Object obj2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second. Assumes that the objects are TimeStamps. Make the comparison based on time fields.

Specified by:
compare in interface java.util.Comparator

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this Comparator. Assumes that the other object is a TimeStamp object. Compares time fields.

Specified by:
equals in interface java.util.Comparator


Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details