@Test(dataProvider = "validEmptyElementsFiles") public void validEmptyElements(final String resource, final GPX expected) throws IOException { try (InputStream in = getClass().getResourceAsStream(resource)) { final GPX gpx = GPX.read(in); Assert.assertEquals(gpx, expected); } }
static GPX read(final DataInput in) throws IOException { return new GPX( Version.of(IO.readString(in)), IO.readString(in), IO.readNullable(Metadata::read, in), IO.reads(WayPoint::read, in), IO.reads(Route::read, in), IO.reads(Track::read, in), IO.readNullable(IO::readDoc, in) ); }
GPX implements Serializable { static GPX read(final DataInput in) throws IOException { return new GPX( Version.of(IO.readString(in)), IO.readString(in), IO.readNullable(Metadata::read, in), IO.reads(WayPoint::read, in), IO.reads(Route::read, in), IO.reads(Track::read, in), IO.readNullable(IO::readDoc, in) ); } }
GPX implements Serializable { static GPX read(final DataInput in) throws IOException { return new GPX( Version.of(IO.readString(in)), IO.readString(in), IO.readNullable(Metadata::read, in), IO.reads(WayPoint::read, in), IO.reads(Route::read, in), IO.reads(Track::read, in), IO.readNullable(IO::readDoc, in) ); } 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 { static GPX read(final DataInput in) throws IOException { return new GPX( Version.of(IO.readString(in)), IO.readString(in), IO.readNullable(Metadata::read, in), IO.reads(WayPoint::read, in), IO.reads(Route::read, in), IO.reads(Track::read, in), IO.readNullable(IO::readDoc, in) ); } 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 { static GPX read(final DataInput in) throws IOException { return new GPX( Version.of(IO.readString(in)), IO.readString(in), IO.readNullable(Metadata::read, in), IO.reads(WayPoint::read, in), IO.reads(Route::read, in), IO.reads(Track::read, in), IO.readNullable(IO::readDoc, in) ); } 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);  }