|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.EventObject
location.LocationEvent
This class encapsulates the events generated when the location changes.
| Field Summary | |
(package private) double |
altitude
The altitude in meters above sea level. |
(package private) double |
course
The course in degrees. |
(package private) java.util.Date |
date
The time the location was measured. |
(package private) boolean |
isValid
Whether this LocationEvent contains valid information. |
(package private) Location |
location
The location |
(package private) double |
speed
The speed in meters per second. |
| Fields inherited from class java.util.EventObject |
source |
| Constructor Summary | |
LocationEvent(java.lang.Object source,
Location newLocation,
java.util.Date date,
double speed,
double altitude,
double course,
boolean isValid)
The constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
This method returns a deep copy of this object. |
boolean |
equals(java.lang.Object o)
Determines if another object is equal to this LocationEvent. |
double |
getAltitude()
Returns tha altitude in meters above sea level. |
double |
getCourse()
Returns the course in degrees. |
java.util.Date |
getDate()
Returns the time stamp of this location. |
Location |
getLocation()
Returns the current location. |
double |
getSpeed()
Returns the speed in meters per second. |
boolean |
isValid()
Accessor method to flag isValid. |
java.lang.String |
toString()
Gives a string representation of the object |
| Methods inherited from class java.util.EventObject |
getSource |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
Location location
java.util.Date date
double speed
double altitude
double course
boolean isValid
| Constructor Detail |
public LocationEvent(java.lang.Object source,
Location newLocation,
java.util.Date date,
double speed,
double altitude,
double course,
boolean isValid)
source - the event sourcenewLocation - the new locationspeed - the speed in meters per secondaltitude - the altitude in meters above sea levelcourse - the course in degreesisValid - true if the included data is a valid measurement
(Initially, the RealGPS will not provide valid measurements).| Method Detail |
public boolean equals(java.lang.Object o)
public Location getLocation()
public java.util.Date getDate()
public double getSpeed()
public double getAltitude()
public double getCourse()
public boolean isValid()
public java.lang.String toString()
public java.lang.Object clone()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||