@Test(dataProvider = "pointSizes") public void collectTourLength(final int size) { final Random random = new Random(123); final List<WayPoint> points = Stream .generate(() -> WayPointTest.nextWayPoint(random)) .limit(size) .collect(Collectors.toList()); Assert.assertEquals( tourLength(points), points.stream() .collect(GEOID.toTourLength()) .doubleValue() ); }
public Collector<Point, ?, Length> toTourLength() { return Collector.of( () -> new LengthCollector(this), LengthCollector::add, LengthCollector::combine, LengthCollector::tourLength ); }
Geoid { public Collector<Point, ?, Length> toTourLength() { return Collector.of( () -> new LengthCollector(this), LengthCollector::add, LengthCollector::combine, LengthCollector::tourLength ); } }
Geoid { public Collector<Point, ?, Length> toTourLength() { return Collector.of( () -> new LengthCollector(this), LengthCollector::add, LengthCollector::combine, LengthCollector::tourLength ); } private  Geoid(final Ellipsoid ellipsoid); }
Geoid { public Collector<Point, ?, Length> toTourLength() { return Collector.of( () -> new LengthCollector(this), LengthCollector::add, LengthCollector::combine, LengthCollector::tourLength ); } private  Geoid(final Ellipsoid ellipsoid); Ellipsoid ellipsoid(); Length distance(final Point start, final Point end); Collector<Point, ?, Length> toPathLength(); Collector<Point, ?, Length> toTourLength(); static Geoid of(final Ellipsoid ellipsoid); }
Geoid { public Collector<Point, ?, Length> toTourLength() { return Collector.of( () -> new LengthCollector(this), LengthCollector::add, LengthCollector::combine, LengthCollector::tourLength ); } private  Geoid(final Ellipsoid ellipsoid); Ellipsoid ellipsoid(); Length distance(final Point start, final Point end); Collector<Point, ?, Length> toPathLength(); Collector<Point, ?, Length> toTourLength(); static Geoid of(final Ellipsoid ellipsoid); static final Geoid WGS84; static final Geoid IERS_1989; static final Geoid IERS_2003; static final Geoid DEFAULT; }