From f83e9cd5e43f948f101ca61dcc38fcfddb15cc01 Mon Sep 17 00:00:00 2001 From: Michael Tsang Date: Wed, 25 Sep 2024 12:47:16 +0100 Subject: [PATCH] move line comments to separate lines --- .../gtfs/mapping/TransitModeMapper.java | 44 ++++++++++++------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/opentripplanner/gtfs/mapping/TransitModeMapper.java b/src/main/java/org/opentripplanner/gtfs/mapping/TransitModeMapper.java index 203dd5693e3..86d8a9db732 100644 --- a/src/main/java/org/opentripplanner/gtfs/mapping/TransitModeMapper.java +++ b/src/main/java/org/opentripplanner/gtfs/mapping/TransitModeMapper.java @@ -16,11 +16,14 @@ public static TransitMode mapMode(int routeType) { } /* TPEG Extension https://groups.google.com/d/msg/gtfs-changes/keT5rTPS7Y0/71uMz2l6ke0J */ - if (routeType >= 100 && routeType < 200) { // Railway Service + if (routeType >= 100 && routeType < 200) { + // Railway Service return TransitMode.RAIL; - } else if (routeType >= 200 && routeType < 300) { //Coach Service + } else if (routeType >= 200 && routeType < 300) { + // Coach Service return TransitMode.COACH; - } else if (routeType >= 300 && routeType < 500) { //Suburban Railway Service and Urban Railway service + } else if (routeType >= 300 && routeType < 500) { + // Suburban Railway Service and Urban Railway service if (routeType >= 401 && routeType <= 402) { return TransitMode.SUBWAY; } @@ -28,23 +31,32 @@ public static TransitMode mapMode(int routeType) { return TransitMode.MONORAIL; } return TransitMode.RAIL; - } else if (routeType >= 500 && routeType < 700) { //Metro Service and Underground Service + } else if (routeType >= 500 && routeType < 700) { + // Metro Service and Underground Service return TransitMode.SUBWAY; - } else if (routeType >= 700 && routeType < 800) { //Bus Service + } else if (routeType >= 700 && routeType < 800) { + // Bus Service return TransitMode.BUS; - } else if (routeType >= 800 && routeType < 900) { //Trolleybus Service + } else if (routeType >= 800 && routeType < 900) { + // Trolleybus Service return TransitMode.TROLLEYBUS; - } else if (routeType >= 900 && routeType < 1000) { //Tram service + } else if (routeType >= 900 && routeType < 1000) { + // Tram service return TransitMode.TRAM; - } else if (routeType >= 1000 && routeType < 1100) { //Water Transport Service + } else if (routeType >= 1000 && routeType < 1100) { + // Water Transport Service return TransitMode.FERRY; - } else if (routeType >= 1100 && routeType < 1200) { //Air Service + } else if (routeType >= 1100 && routeType < 1200) { + // Air Service return TransitMode.AIRPLANE; - } else if (routeType >= 1200 && routeType < 1300) { //Ferry Service + } else if (routeType >= 1200 && routeType < 1300) { + // Ferry Service return TransitMode.FERRY; - } else if (routeType >= 1300 && routeType < 1400) { //Telecabin Service + } else if (routeType >= 1300 && routeType < 1400) { + // Telecabin Service return TransitMode.GONDOLA; - } else if (routeType >= 1400 && routeType < 1500) { //Funicular Service + } else if (routeType >= 1400 && routeType < 1500) { + // Funicular Service return TransitMode.FUNICULAR; } else if (routeType >= 1551 && routeType < 1561) { // Carpooling, not defined anywhere, so we've chosen this number space @@ -52,11 +64,13 @@ public static TransitMode mapMode(int routeType) { // standardise return TransitMode.CARPOOL; } else if (routeType >= 1500 && routeType < 1599) { - //Taxi Service + // Taxi Service return TransitMode.TAXI; - } else if (routeType >= 1600 && routeType < 1700) { //Self drive + } else if (routeType >= 1600 && routeType < 1700) { + // Self drive return TransitMode.BUS; - } else if (routeType >= 1700 && routeType < 1800) { //Miscellaneous Service + } else if (routeType >= 1700 && routeType < 1800) { + // Miscellaneous Service return null; } /* Original GTFS route types. Should these be checked before TPEG types? */