@Test public void testTargetsFilteredByTargetInfo() throws Exception { BoundingBox boundingBox = BoundingBox.create( Position.create(55.0, 11.0), Position.create(56.0, 12.0), CoordinateSystem.CARTESIAN ); assertEquals(22, aisTrackService.targets( src -> true, target -> { final boolean test = boundingBox.contains(target.getPosition()); System.out.println("Testing if " + target.getPosition() + " lies within " + boundingBox + ": " + (test ? "OK":"NOK")); return test; }) .size() ); }
public Set<TargetInfo> targets() { return tracker .streamSequential() .collect(Collectors.toSet()); }
AisTrackService { public Set<TargetInfo> targets() { return tracker .streamSequential() .collect(Collectors.toSet()); } }
AisTrackService { public Set<TargetInfo> targets() { return tracker .streamSequential() .collect(Collectors.toSet()); } AisTrackService();  AisTrackService(Predicate<AisPacket> trackerInputPacketFilter); }
AisTrackService { public Set<TargetInfo> targets() { return tracker .streamSequential() .collect(Collectors.toSet()); } AisTrackService();  AisTrackService(Predicate<AisPacket> trackerInputPacketFilter); int numberOfTargets(); int numberOfTargets(Predicate<? super AisPacketSource> packetSourceFilter); Set<TargetInfo> targets(); Set<TargetInfo> targets(Predicate<? super AisPacketSource> packetSourceFilter, Predicate<? super TargetInfo> targetInfoFilter); TargetInfo target(int mmsi, Predicate<? super AisPacketSource> packetSourceFilter); void start(); void stop(); static void main(String[] args); }
AisTrackService { public Set<TargetInfo> targets() { return tracker .streamSequential() .collect(Collectors.toSet()); } AisTrackService();  AisTrackService(Predicate<AisPacket> trackerInputPacketFilter); int numberOfTargets(); int numberOfTargets(Predicate<? super AisPacketSource> packetSourceFilter); Set<TargetInfo> targets(); Set<TargetInfo> targets(Predicate<? super AisPacketSource> packetSourceFilter, Predicate<? super TargetInfo> targetInfoFilter); TargetInfo target(int mmsi, Predicate<? super AisPacketSource> packetSourceFilter); void start(); void stop(); static void main(String[] args);  }