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 GPSPointImpladdTime(Time t)List<GeoPosition>boundingBox(double range)intcompareTo(GPSPoint p)booleanequals(Object obj)Array<double>getCoordinates()doublegetCoordinate(int dimension)GeoPositionplus(GeoPosition other)GeoPositionplus(@Nonnull() Array<double> other)GeoPositionminus(GeoPosition other)GeoPositionminus(@Nonnull() Array<double> other)intgetDimensions()doubledistanceTo(@Nonnull() GeoPosition other)doublegetLatitude()doublegetLongitude()TimegetTime()doublegetX()doublegetY()inthashCode()GPSPointImplsubtractTime(Time t)StringtoString()-
-
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)
-
minus
GeoPosition minus(GeoPosition other)
-
getDimensions
int getDimensions()
-
distanceTo
double distanceTo(@Nonnull() GeoPosition other)
-
getLatitude
double getLatitude()
-
getLongitude
double getLongitude()
-
getTime
Time getTime()
- Returns:
the time
-
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
-
-
-
-