public final class GpsTrace extends Object implements JsonRenderable
GpsTrace()
Constructor and Description |
---|
GpsTrace()
Same as
GpsTrace() , for an empty list. |
GpsTrace(Collection<GpsTracePoint> gpsTracePoints)
Create a GPS trace.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canEqual(Object obj) |
boolean |
equals(Object obj) |
List<GpsTracePoint> |
getGpsTracePoints()
Retrieve trace data.
|
GpsTracePoint |
getLastGpsTracePoint()
Get latest, most recent GPS point.
|
int |
hashCode() |
static Collection<GpsTracePoint> |
limitSize(org.joda.time.Duration maxAge,
Integer maxSize,
Collection<GpsTracePoint> gpsTracePoints1,
GpsTracePoint... gpsTracePoints2)
Return a limited list of GPS points.
|
String |
toJson()
Provide a Json representation of a domain object.
|
String |
toString() |
GpsTrace |
withGpsTracePoints(Collection<GpsTracePoint> gpsTracePoints1,
GpsTracePoint... gpsTracePoints2)
Setter for
getGpsTracePoints() |
GpsTrace |
withGpsTracePoints(GpsTracePoint... gpsTracePoints) |
public GpsTrace(@Nonnull Collection<GpsTracePoint> gpsTracePoints)
gpsTracePoints
- Trace points.public GpsTrace()
GpsTrace()
, for an empty list.@Nonnull public List<GpsTracePoint> getGpsTracePoints()
@Nonnull public GpsTrace withGpsTracePoints(@Nonnull Collection<GpsTracePoint> gpsTracePoints1, @Nonnull GpsTracePoint... gpsTracePoints2)
getGpsTracePoints()
gpsTracePoints1
- New trace data.gpsTracePoints2
- New trace data.@Nonnull public GpsTrace withGpsTracePoints(@Nonnull GpsTracePoint... gpsTracePoints)
@Nullable public GpsTracePoint getLastGpsTracePoint()
@Nonnull public static Collection<GpsTracePoint> limitSize(@Nonnull org.joda.time.Duration maxAge, @Nonnull Integer maxSize, @Nonnull Collection<GpsTracePoint> gpsTracePoints1, @Nonnull GpsTracePoint... gpsTracePoints2)
maxAge
- Maximum age difference between oldest and newest point.maxSize
- Maximum number of points.gpsTracePoints1
- Original list 1.gpsTracePoints2
- Original list 2.public String toJson()
JsonRenderable
toJson
in interface JsonRenderable
Copyright © 2018 TomTom International BV. All rights reserved.