Package org.openstreetmap.josm.data.gpx
Class Line
java.lang.Object
org.openstreetmap.josm.data.gpx.Line
- All Implemented Interfaces:
Iterable<WayPoint>,Collection<WayPoint>
Line represents a linear collection of GPX waypoints with the ordered/unordered distinction.
- Since:
- 14451
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends WayPoint> c) voidclear()booleanbooleancontainsAll(Collection<?> c) getColor()Returns the track/route colorbooleanisEmpty()booleanDetermines if waypoints are ordered.iterator()booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
waypoints
-
unordered
-
color
-
-
Constructor Details
-
Line
Constructs a newLine.- Parameters:
waypoints- collection of waypointsattributes- track/route attributescolor- color of the track- Since:
- 15496
-
Line
Constructs a newLine.- Parameters:
trackSegment- track segmenttrackAttributes- track attributescolor- color of the track- Since:
- 15496
-
Line
Constructs a newLine.- Parameters:
route- route
-
-
Method Details
-
isUnordered
Determines if waypoints are ordered.- Returns:
trueif waypoints are ordered
-
getColor
Returns the track/route color- Returns:
- the color
- Since:
- 15496
-
size
- Specified by:
sizein interfaceCollection<WayPoint>
-
isEmpty
- Specified by:
isEmptyin interfaceCollection<WayPoint>
-
contains
- Specified by:
containsin interfaceCollection<WayPoint>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<WayPoint>
-
toArray
- Specified by:
toArrayin interfaceCollection<WayPoint>
-
add
- Specified by:
addin interfaceCollection<WayPoint>
-
remove
- Specified by:
removein interfaceCollection<WayPoint>
-
containsAll
- Specified by:
containsAllin interfaceCollection<WayPoint>
-
addAll
- Specified by:
addAllin interfaceCollection<WayPoint>
-
removeAll
- Specified by:
removeAllin interfaceCollection<WayPoint>
-
retainAll
- Specified by:
retainAllin interfaceCollection<WayPoint>
-
clear
- Specified by:
clearin interfaceCollection<WayPoint>
-