
org.opentripplanner.street.model.vertex.TransitStopVertexBuilder 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.street.model.vertex;
import java.util.Objects;
import java.util.Set;
import org.opentripplanner.transit.model.basic.TransitMode;
import org.opentripplanner.transit.model.site.RegularStop;
public class TransitStopVertexBuilder {
private RegularStop stop;
private Set modes;
/**
* Protected access to avoid instantiation, use
* {@link org.opentripplanner.street.model.vertex.TransitStopVertex#of()} method instead.
*/
TransitStopVertexBuilder() {}
public TransitStopVertexBuilder withStop(RegularStop stop) {
this.stop = stop;
return this;
}
public TransitStopVertexBuilder withModes(Set modes) {
this.modes = modes;
return this;
}
public TransitStopVertex build() {
Objects.requireNonNull(stop);
return new TransitStopVertex(stop, modes);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy