java.lang.Object
io.jenetics.jpx.TrackSegment
- All Implemented Interfaces:
Serializable,Iterable<WayPoint>
A Track Segment holds a list of Track Points which are logically connected in
order. To represent a single GPS track where GPS reception was lost, or the
GPS receiver was turned off, start a new Track Segment for each continuous
span of track data.
- Since:
- 1.0
- Version:
- 1.5
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for creating immutableTrackSegmentobjects. -
Method Summary
Modifier and TypeMethodDescriptionstatic TrackSegment.Builderbuilder()Create a new track-segment builder.booleanReturn the (cloned) extensions document.Return the track-points of this segment.inthashCode()booleanisEmpty()Returntrueifthistrack-segment doesn't contain any track-point.iterator()booleannonEmpty()Returntrueifthistrack-segment contains at least one track-point.static TrackSegmentCreate a new track-segment with the given points.static TrackSegmentCreate a new track-segment with the given points.points()Return a stream ofWayPointobjects this track-segments contains.Convert the immutable track-segment object into a mutable builder initialized with the current track-segment values.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
getPoints
Return the track-points of this segment.- Returns:
- the track-points of this segment
-
points
Return a stream ofWayPointobjects this track-segments contains.- Returns:
- a stream of
WayPointobjects this track-segment contains
-
iterator
-
getExtensions
Return the (cloned) extensions document. The root element of the returned document has the nameextensions.<extensions> ... </extensions>- Returns:
- the extensions document
- Throws:
DOMException- if the document could not be cloned, because of an erroneous XML configuration- Since:
- 1.5
-
toBuilder
Convert the immutable track-segment object into a mutable builder initialized with the current track-segment values.- Returns:
- a new track-segment builder initialized with the values of
thistrack-segment - Since:
- 1.1
-
isEmpty
Returntrueifthistrack-segment doesn't contain any track-point.- Returns:
trueifthistrack-segment is empty,falseotherwise
-
nonEmpty
Returntrueifthistrack-segment contains at least one track-point.- Returns:
trueifthistrack-segment is not empty,falseotherwise- Since:
- 1.1
-
hashCode
-
equals
-
toString
-
builder
Create a new track-segment builder.- Returns:
- a new track-segment builder
-
of
Create a new track-segment with the given points.- Parameters:
points- the points of the track-segmentextensions- the extensions document- Returns:
- a new track-segment with the given points
- Throws:
NullPointerException- if the givenpointssequence isnull- Since:
- 1.5
-
of
Create a new track-segment with the given points.- Parameters:
points- the points of the track-segment- Returns:
- a new track-segment with the given points
- Throws:
NullPointerException- if the givenpointssequence isnull
-