org.opentripplanner.updater.vehicle_position.VehiclePositionUpdaterRunnable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of otp Show documentation
Show all versions of otp Show documentation
The OpenTripPlanner multimodal journey planning system
package org.opentripplanner.updater.vehicle_position;
import com.google.transit.realtime.GtfsRealtime.VehiclePosition;
import java.util.List;
import java.util.Objects;
import org.opentripplanner.routing.graph.Graph;
import org.opentripplanner.transit.service.TransitModel;
import org.opentripplanner.updater.GraphWriterRunnable;
public record VehiclePositionUpdaterRunnable(
List updates,
VehiclePositionPatternMatcher matcher
)
implements GraphWriterRunnable {
public VehiclePositionUpdaterRunnable {
Objects.requireNonNull(updates);
Objects.requireNonNull(matcher);
}
@Override
public void run(Graph graph, TransitModel transitModel) {
// Apply new vehicle positions
matcher.applyVehiclePositionUpdates(updates);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy