
org.opentripplanner.ext.stopconsolidation.model.ConsolidatedStopLeg 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
The newest version!
package org.opentripplanner.ext.stopconsolidation.model;
import java.util.Objects;
import org.opentripplanner.model.plan.Place;
import org.opentripplanner.model.plan.ScheduledTransitLeg;
import org.opentripplanner.model.plan.ScheduledTransitLegBuilder;
import org.opentripplanner.transit.model.site.StopLocation;
public class ConsolidatedStopLeg extends ScheduledTransitLeg {
private final StopLocation from;
private final StopLocation to;
public ConsolidatedStopLeg(ScheduledTransitLeg original, StopLocation from, StopLocation to) {
super(new ScheduledTransitLegBuilder<>(original));
this.from = Objects.requireNonNull(from);
this.to = Objects.requireNonNull(to);
this.setFareProducts(original.fareProducts());
}
@Override
public Place getFrom() {
return Place.forStop(from);
}
@Override
public Place getTo() {
return Place.forStop(to);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy