Skip to content

Commit

Permalink
Rename 'transferByStop' variable to 'transfersByStop'.
Browse files Browse the repository at this point in the history
  • Loading branch information
VillePihlava committed Nov 19, 2024
1 parent 56f3b2a commit 93b49d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static List<List<Transfer>> mapTransfers(
SiteRepository siteRepository,
TransitService transitService
) {
List<List<Transfer>> transferByStopIndex = new ArrayList<>();
List<List<Transfer>> transfersByStopIndex = new ArrayList<>();

for (int i = 0; i < siteRepository.stopIndexSize(); ++i) {
var stop = siteRepository.stopByIndex(i);
Expand All @@ -45,10 +45,10 @@ static List<List<Transfer>> mapTransfers(
}

// Create a copy to compact and make the inner lists immutable
transferByStopIndex.add(List.copyOf(list));
transfersByStopIndex.add(List.copyOf(list));
}

// Return an immutable copy
return List.copyOf(transferByStopIndex);
return List.copyOf(transfersByStopIndex);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static TransitLayer map(

private TransitLayer map(TransitTuningParameters tuningParameters) {
HashMap<LocalDate, List<TripPatternForDate>> tripPatternsByStopByDate;
List<List<Transfer>> transferByStopIndex;
List<List<Transfer>> transfersByStopIndex;
ConstrainedTransfersForPatterns constrainedTransfers = null;

LOG.info("Mapping transitLayer from TimetableRepository...");
Expand All @@ -71,7 +71,7 @@ private TransitLayer map(TransitTuningParameters tuningParameters) {

tripPatternsByStopByDate = mapTripPatterns(allTripPatterns);

transferByStopIndex = mapTransfers(siteRepository, transitService);
transfersByStopIndex = mapTransfers(siteRepository, transitService);

TransferIndexGenerator transferIndexGenerator = null;
if (OTPFeature.TransferConstraints.isOn()) {
Expand All @@ -86,7 +86,7 @@ private TransitLayer map(TransitTuningParameters tuningParameters) {

return new TransitLayer(
tripPatternsByStopByDate,
transferByStopIndex,
transfersByStopIndex,
transitService.getTransferService(),
siteRepository,
transferCache,
Expand Down

0 comments on commit 93b49d4

Please sign in to comment.