Class GPSPointImpl
-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.GeoPosition
,it.unibo.alchemist.model.Position
,it.unibo.alchemist.model.Position2D
,it.unibo.alchemist.model.maps.GPSPoint
,java.io.Serializable
,java.lang.Comparable
public final class GPSPointImpl implements GPSPoint
-
-
Constructor Summary
Constructors Constructor Description GPSPointImpl(double latitude, double longitude, Time time)
GPSPointImpl(LatLongPosition latlong, Time time)
-
Method Summary
Modifier and Type Method Description GPSPointImpl
addTime(Time t)
List<GeoPosition>
boundingBox(double range)
int
compareTo(GPSPoint p)
boolean
equals(Object obj)
Array<double>
getCoordinates()
double
getCoordinate(int dimension)
GeoPosition
plus(GeoPosition other)
GeoPosition
plus(@Nonnull() Array<double> other)
GeoPosition
minus(GeoPosition other)
GeoPosition
minus(@Nonnull() Array<double> other)
int
getDimensions()
double
distanceTo(@Nonnull() GeoPosition other)
double
getLatitude()
double
getLongitude()
Time
getTime()
double
getX()
double
getY()
int
hashCode()
GPSPointImpl
subtractTime(Time t)
String
toString()
-
-
Constructor Detail
-
GPSPointImpl
GPSPointImpl(double latitude, double longitude, Time time)
- Parameters:
latitude
- latitudelongitude
- longitudetime
- time
-
GPSPointImpl
GPSPointImpl(LatLongPosition latlong, Time time)
- Parameters:
latlong
- latitude and longitudetime
- time
-
-
Method Detail
-
addTime
GPSPointImpl addTime(Time t)
- Parameters:
t
- time to add to the point's time- Returns:
new GPSPoint with the new time
-
boundingBox
@Nonnull() List<GeoPosition> boundingBox(double range)
-
getCoordinates
@Nonnull() Array<double> getCoordinates()
-
getCoordinate
double getCoordinate(int dimension)
-
plus
GeoPosition plus(GeoPosition other)
-
plus
@Nonnull() GeoPosition plus(@Nonnull() Array<double> other)
-
minus
GeoPosition minus(GeoPosition other)
-
minus
@Nonnull() GeoPosition minus(@Nonnull() Array<double> other)
-
getDimensions
int getDimensions()
-
distanceTo
double distanceTo(@Nonnull() GeoPosition other)
-
getLatitude
double getLatitude()
-
getLongitude
double getLongitude()
-
getX
double getX()
-
getY
double getY()
-
hashCode
int hashCode()
-
subtractTime
GPSPointImpl subtractTime(Time t)
- Parameters:
t
- time to subtract to the point's time- Returns:
new GPSPoint with the new time
-
-
-
-