@Test public void readCourse() throws IOException { final GPX gpx = readV10("GPX_10-1.gpx"); final List<Degrees> courses = gpx.tracks() .flatMap(Track::segments) .flatMap(TrackSegment::points) .filter(wp -> wp.getCourse().isPresent()) .map(wp -> wp.getCourse().orElseThrow()) .collect(Collectors.toList()); Assert.assertEquals( courses, asList(Degrees.ofDegrees(341.6), Degrees.ofDegrees(298.6)) ); }
public Stream<Track> tracks() { return _tracks.stream(); }
GPX implements Serializable { public Stream<Track> tracks() { return _tracks.stream(); } }
GPX implements Serializable { public Stream<Track> tracks() { return _tracks.stream(); } private  GPX(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); }
GPX implements Serializable { public Stream<Track> tracks() { return _tracks.stream(); } private  GPX(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); String getVersion(); String getCreator(); Optional<Metadata> getMetadata(); List<WayPoint> getWayPoints(); Stream<WayPoint> wayPoints(); List<Route> getRoutes(); Stream<Route> routes(); List<Track> getTracks(); Stream<Track> tracks(); Optional<Document> getExtensions(); Builder toBuilder(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); static Builder builder(final Version version, final String creator); static Builder builder(final String creator); static Builder builder(); static GPX of(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); static GPX of(
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks
	); static GPX of(
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); static GPX of(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks
	); static Writer writer(final String indent); static Writer writer(); static void write(final GPX gpx, final OutputStream output); static void write(final GPX gpx, final Path path); static Reader reader(final Version version, final Mode mode); static Reader reader(final Version version); static Reader reader(final Mode mode); static Reader reader(); static GPX read(final InputStream input); static GPX read(final Path path); static GPX read(final String path); }
GPX implements Serializable { public Stream<Track> tracks() { return _tracks.stream(); } private  GPX(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); String getVersion(); String getCreator(); Optional<Metadata> getMetadata(); List<WayPoint> getWayPoints(); Stream<WayPoint> wayPoints(); List<Route> getRoutes(); Stream<Route> routes(); List<Track> getTracks(); Stream<Track> tracks(); Optional<Document> getExtensions(); Builder toBuilder(); @Override String toString(); @Override int hashCode(); @Override boolean equals(final Object obj); static Builder builder(final Version version, final String creator); static Builder builder(final String creator); static Builder builder(); static GPX of(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); static GPX of(
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks
	); static GPX of(
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks,
		final Document extensions
	); static GPX of(
		final Version version,
		final String creator,
		final Metadata metadata,
		final List<WayPoint> wayPoints,
		final List<Route> routes,
		final List<Track> tracks
	); static Writer writer(final String indent); static Writer writer(); static void write(final GPX gpx, final OutputStream output); static void write(final GPX gpx, final Path path); static Reader reader(final Version version, final Mode mode); static Reader reader(final Version version); static Reader reader(final Mode mode); static Reader reader(); static GPX read(final InputStream input); static GPX read(final Path path); static GPX read(final String path);  }