|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.EventObject | +--location.LocationEvent
This class encapsulates the events generated when the location changes.
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 |
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)
equals
in class java.lang.Object
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()
toString
in class java.util.EventObject
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |