public final class TrackSegment extends Object implements Iterable<WayPoint>, Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TrackSegment.Builder
Builder class for creating immutable
TrackSegment objects. |
Modifier and Type | Method and Description |
---|---|
static TrackSegment.Builder |
builder()
Create a new track-segment builder.
|
boolean |
equals(Object obj) |
List<WayPoint> |
getPoints()
Return the track-points of this segment.
|
int |
hashCode() |
boolean |
isEmpty()
Return
true if this track-segment doesn't contain any
track-point. |
Iterator<WayPoint> |
iterator() |
boolean |
nonEmpty()
Return
true if this track-segment contains at least one
track-point. |
static TrackSegment |
of(List<WayPoint> points)
Create a new track-segment with the given points.
|
Stream<WayPoint> |
points()
Return a stream of
WayPoint objects this track-segments contains. |
TrackSegment.Builder |
toBuilder()
Convert the immutable track-segment object into a
mutable builder initialized with the current track-segment
values.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public List<WayPoint> getPoints()
public Stream<WayPoint> points()
WayPoint
objects this track-segments contains.WayPoint
objects this track-segment containspublic TrackSegment.Builder toBuilder()
this
track-segmentpublic boolean isEmpty()
true
if this
track-segment doesn't contain any
track-point.true
if this
track-segment is empty, false
otherwisepublic boolean nonEmpty()
true
if this
track-segment contains at least one
track-point.true
if this
track-segment is not empty,
false
otherwisepublic static TrackSegment.Builder builder()
public static TrackSegment of(List<WayPoint> points)
points
- the points of the track-segmentNullPointerException
- if the given points
sequence is
null
© 2017-2017 Franz Wilhelmstötter (2017-11-04 19:06)