}
}
private boolean hasPotentialAreaMatch(TrainInstance trainInstance, long time,
Set<String> stanoxAreaIds) {
BasicScheduleElement schedule = trainInstance.getSchedule();
if (schedule == null) {
return false;
}
if (trainInstance.getLastStanox() != 0
&& Math.abs(time - trainInstance.getLastStanoxTime()) < _timepointMatchThreshold
&& hasStanoxAreaMatch(trainInstance.getLastStanox(), stanoxAreaIds)) {
return true;
}
List<TimepointElement> timepoints = schedule.getTimepoints();
if (timepoints.isEmpty()) {
return false;
}
TimepointElement firstTimepoint = timepoints.get(0);