}
private void removeExpiredTrains() {
Iterator<TrainInstance> it = _trainsById.values().iterator();
while (it.hasNext()) {
TrainInstance instance = it.next();
if (true) {
throw new UnsupportedOperationException();
}
int timeout = false /*instance.hasMoved()*/ ? _trainMovemenExpirationTimeInSeconds
: _trainActivationExpirationTimeInSeconds;
if (_mostRecentTimestamp > instance.getLastUpdateTime() + timeout * 1000) {
it.remove();
_narrativeService.closeMessages(instance);
Set<TrainInstance> instances = _trainsByShortId.get(instance.getTrainReportingNumber());
if (instances != null) {
instances.remove(instance);
if (instances.isEmpty()) {
_trainsByShortId.remove(instance.getTrainReportingNumber());
}
}
}
}
}