@Test public void testIsTrackPairAnalyzed() throws Exception { analysis.clearTrackPairsAnalyzed(); assertFalse(analysis.isTrackPairAnalyzed(track, track)); assertFalse(analysis.isTrackPairAnalyzed(track, distantNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(newNearbyTrack, distantNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, oldNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, newNearbyTrack)); analysis.markTrackPairAnalyzed(track, distantNearbyTrack); assertFalse(analysis.isTrackPairAnalyzed(track, track)); assertTrue(analysis.isTrackPairAnalyzed(track, distantNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(newNearbyTrack, distantNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, oldNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, newNearbyTrack)); analysis.markTrackPairAnalyzed(newNearbyTrack, distantNearbyTrack); assertFalse(analysis.isTrackPairAnalyzed(track, track)); assertTrue(analysis.isTrackPairAnalyzed(track, distantNearbyTrack)); assertTrue(analysis.isTrackPairAnalyzed(newNearbyTrack, distantNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, oldNearbyTrack)); assertFalse(analysis.isTrackPairAnalyzed(track, newNearbyTrack)); }
boolean isTrackPairAnalyzed(Track track1, Track track2) { String trackPairKey = calculateTrackPairKey(track1, track2); return trackPairsAnalyzed.contains(trackPairKey); }
CloseEncounterAnalysis extends PeriodicAnalysis { boolean isTrackPairAnalyzed(Track track1, Track track2) { String trackPairKey = calculateTrackPairKey(track1, track2); return trackPairsAnalyzed.contains(trackPairKey); } }
CloseEncounterAnalysis extends PeriodicAnalysis { boolean isTrackPairAnalyzed(Track track1, Track track2) { String trackPairKey = calculateTrackPairKey(track1, track2); return trackPairsAnalyzed.contains(trackPairKey); } @Inject  CloseEncounterAnalysis(Configuration configuration, AppStatisticsService statisticsService, EventEmittingTracker trackingService, EventRepository eventRepository, SafetyZoneService safetyZoneService); }
CloseEncounterAnalysis extends PeriodicAnalysis { boolean isTrackPairAnalyzed(Track track1, Track track2) { String trackPairKey = calculateTrackPairKey(track1, track2); return trackPairsAnalyzed.contains(trackPairKey); } @Inject  CloseEncounterAnalysis(Configuration configuration, AppStatisticsService statisticsService, EventEmittingTracker trackingService, EventRepository eventRepository, SafetyZoneService safetyZoneService); @Override String toString(); }
CloseEncounterAnalysis extends PeriodicAnalysis { boolean isTrackPairAnalyzed(Track track1, Track track2) { String trackPairKey = calculateTrackPairKey(track1, track2); return trackPairsAnalyzed.contains(trackPairKey); } @Inject  CloseEncounterAnalysis(Configuration configuration, AppStatisticsService statisticsService, EventEmittingTracker trackingService, EventRepository eventRepository, SafetyZoneService safetyZoneService); @Override String toString();  }