-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5455 from entur/add_support_for_dsj_in_leg_reference
Add support for DSJ in transit leg reference
- Loading branch information
Showing
16 changed files
with
602 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/main/java/org/opentripplanner/model/plan/FrequencyTransitLegBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.opentripplanner.model.plan; | ||
|
||
public class FrequencyTransitLegBuilder | ||
extends ScheduledTransitLegBuilder<FrequencyTransitLegBuilder> { | ||
|
||
private int frequencyHeadwayInSeconds; | ||
|
||
public FrequencyTransitLegBuilder() {} | ||
|
||
public FrequencyTransitLegBuilder(FrequencyTransitLeg original) { | ||
super(original); | ||
frequencyHeadwayInSeconds = original.getHeadway(); | ||
} | ||
|
||
public FrequencyTransitLegBuilder withFrequencyHeadwayInSeconds(int frequencyHeadwayInSeconds) { | ||
this.frequencyHeadwayInSeconds = frequencyHeadwayInSeconds; | ||
return instance(); | ||
} | ||
|
||
public int frequencyHeadwayInSeconds() { | ||
return frequencyHeadwayInSeconds; | ||
} | ||
|
||
@Override | ||
public FrequencyTransitLeg build() { | ||
return new FrequencyTransitLeg(this); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.