From c52680e0b272477fe8fcbdd8bafb9d1b8fea5fb8 Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Thu, 18 Jan 2024 18:45:47 +0100 Subject: [PATCH] review: Fix JavaDoc refs and language --- .../TransitGeneralizedCostFilterParams.java | 4 +- ...veOtherThanSameLegsMaxGeneralizedCost.java | 5 +- .../framework/spi/ItineraryListFilter.java | 7 +- .../ItineraryListFilterChain.excalidraw | 228 +++++++++--------- .../images/ItineraryListFilterChain.svg | 2 +- 5 files changed, 122 insertions(+), 124 deletions(-) diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java index c909ff00db0..a173f6b454b 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/api/TransitGeneralizedCostFilterParams.java @@ -1,11 +1,11 @@ package org.opentripplanner.routing.algorithm.filterchain.api; import org.opentripplanner.framework.lang.DoubleUtils; -import org.opentripplanner.routing.algorithm.filterchain.filters.transit.TransitGeneralizedCostFilter; import org.opentripplanner.routing.api.request.framework.CostLinearFunction; /** - * Input parameters for {@link TransitGeneralizedCostFilter} + * Input parameters for + * {@link org.opentripplanner.routing.algorithm.filterchain.filters.transit.TransitGeneralizedCostFilter} * * @param costLimitFunction Describes the function to calculate the limit for an itinerary based * on the generalized cost diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/group/RemoveOtherThanSameLegsMaxGeneralizedCost.java b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/group/RemoveOtherThanSameLegsMaxGeneralizedCost.java index becac712445..0194cfa2bbc 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/group/RemoveOtherThanSameLegsMaxGeneralizedCost.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/filters/transit/group/RemoveOtherThanSameLegsMaxGeneralizedCost.java @@ -7,7 +7,6 @@ import java.util.stream.Collectors; import org.opentripplanner.model.plan.Itinerary; import org.opentripplanner.model.plan.Leg; -import org.opentripplanner.routing.algorithm.filterchain.filters.transit.TransitGeneralizedCostFilter; import org.opentripplanner.routing.algorithm.filterchain.framework.filter.GroupByFilter; import org.opentripplanner.routing.algorithm.filterchain.framework.spi.RemoveItineraryFlagger; import org.opentripplanner.transit.model.timetable.Trip; @@ -15,8 +14,8 @@ /** * This filter remove itineraries, which use the same trips for most of their legs, but where some * itineraries have a much higher cost for the other legs. This is similar to {@link - * TransitGeneralizedCostFilter}, but is used together with {@link GroupByFilter} to filter within - * the groups. + * org.opentripplanner.routing.algorithm.filterchain.filters.transit.TransitGeneralizedCostFilter}, + * but is used together with {@link GroupByFilter} to filter within the groups. */ public class RemoveOtherThanSameLegsMaxGeneralizedCost implements RemoveItineraryFlagger { diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/spi/ItineraryListFilter.java b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/spi/ItineraryListFilter.java index b0a67ab147f..7d795e6c7fb 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/spi/ItineraryListFilter.java +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/framework/spi/ItineraryListFilter.java @@ -2,7 +2,6 @@ import java.util.List; import org.opentripplanner.model.plan.Itinerary; -import org.opentripplanner.routing.algorithm.filterchain.framework.filter.MaxLimit; /** * Filter, sort or decorate itineraries. A filter can modify the elements in the list, but not the @@ -13,9 +12,9 @@ * in the same filter. Instead, create two filters and insert them after each other in the filter * chain. *

- * This allows decoration of each filter and makes it easier to reuse logic. Like the {@link - * MaxLimit} is reused in - * several places. + * This allows decoration of each filter and makes it easier to reuse logic. Like the + * {@link org.opentripplanner.routing.algorithm.filterchain.framework.filter.MaxLimit} is reused + * in several places. */ public interface ItineraryListFilter { /** diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.excalidraw b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.excalidraw index 76c71874be5..37e3f8de7b2 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.excalidraw +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.excalidraw @@ -5,8 +5,8 @@ "elements": [ { "type": "arrow", - "version": 2479, - "versionNonce": 2086276447, + "version": 2483, + "versionNonce": 773348709, "isDeleted": false, "id": "uTKhXBXl80XXPjGsftdJa", "fillStyle": "hachure", @@ -28,7 +28,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982418479, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": { @@ -57,8 +57,8 @@ }, { "type": "ellipse", - "version": 964, - "versionNonce": 465602847, + "version": 968, + "versionNonce": 607278955, "isDeleted": false, "id": "oV4YIjz-w-0HS_dvr7ZoB", "fillStyle": "hachure", @@ -83,14 +83,14 @@ "id": "uTKhXBXl80XXPjGsftdJa" } ], - "updated": 1704982418479, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "ellipse", - "version": 139, - "versionNonce": 297704337, + "version": 143, + "versionNonce": 810641605, "isDeleted": false, "id": "iXHhu1-MD9tXNfoZZ8Rcq", "fillStyle": "hachure", @@ -115,14 +115,14 @@ "id": "i6hMn3CPVbRxyPcniV7yb" } ], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "arrow", - "version": 363, - "versionNonce": 1672962559, + "version": 367, + "versionNonce": 1181364747, "isDeleted": false, "id": "i6hMn3CPVbRxyPcniV7yb", "fillStyle": "hachure", @@ -144,7 +144,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": { @@ -173,8 +173,8 @@ }, { "type": "text", - "version": 108, - "versionNonce": 2108178065, + "version": 114, + "versionNonce": 1376913445, "isDeleted": false, "id": "nJRU39yv_4LYhT-kVxv_t", "fillStyle": "hachure", @@ -194,7 +194,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982458252, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -209,8 +209,8 @@ }, { "type": "text", - "version": 260, - "versionNonce": 1872284191, + "version": 267, + "versionNonce": 369997995, "isDeleted": false, "id": "D8AYLA3h4ksepFAEqkC7G", "fillStyle": "hachure", @@ -219,18 +219,18 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 592.552734375, + "x": 592.4027938842773, "y": 214.466796875, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 125, + "width": 125.29988098144531, "height": 50, "seed": 1478178009, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -245,8 +245,8 @@ }, { "type": "arrow", - "version": 590, - "versionNonce": 180857681, + "version": 594, + "versionNonce": 1699199877, "isDeleted": false, "id": "abNnvFw7GnSsRXaqnRUYs", "fillStyle": "hachure", @@ -268,7 +268,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": { @@ -297,8 +297,8 @@ }, { "type": "rectangle", - "version": 180, - "versionNonce": 660090431, + "version": 184, + "versionNonce": 1086810955, "isDeleted": false, "id": "bA4uoIjQQ5b7VTjNXnYCH", "fillStyle": "hachure", @@ -323,14 +323,14 @@ "id": "abNnvFw7GnSsRXaqnRUYs" } ], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "text", - "version": 139, - "versionNonce": 1010309425, + "version": 146, + "versionNonce": 573571813, "isDeleted": false, "id": "A4ZjgRaXH3lARCAtxxyGH", "fillStyle": "hachure", @@ -343,14 +343,14 @@ "y": 200.08984375, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 10, + "width": 10.319992065429688, "height": 25, "seed": 770881047, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -365,8 +365,8 @@ }, { "type": "line", - "version": 131, - "versionNonce": 1440091743, + "version": 135, + "versionNonce": 1525795307, "isDeleted": false, "id": "xPF7fs9PPAG3FCbgCedlx", "fillStyle": "hachure", @@ -388,7 +388,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": null, @@ -409,8 +409,8 @@ }, { "type": "freedraw", - "version": 166, - "versionNonce": 622840593, + "version": 170, + "versionNonce": 1566072389, "isDeleted": false, "id": "v7Du5WLNb590wL5Uam6Ta", "fillStyle": "hachure", @@ -432,7 +432,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "points": [ @@ -680,8 +680,8 @@ }, { "type": "rectangle", - "version": 214, - "versionNonce": 367192703, + "version": 218, + "versionNonce": 160912523, "isDeleted": false, "id": "bXMUStvEb709SPfYF07CW", "fillStyle": "hachure", @@ -710,14 +710,14 @@ "id": "hhODwDUSnKDNHxeWgdBRh" } ], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "arrow", - "version": 639, - "versionNonce": 1576419569, + "version": 643, + "versionNonce": 2107526565, "isDeleted": false, "id": "hhODwDUSnKDNHxeWgdBRh", "fillStyle": "hachure", @@ -739,7 +739,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": { @@ -776,8 +776,8 @@ }, { "type": "text", - "version": 120, - "versionNonce": 1413431967, + "version": 127, + "versionNonce": 1819446059, "isDeleted": false, "id": "svSoLS4U9UhcZVccLd8Kz", "fillStyle": "hachure", @@ -786,11 +786,11 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 954.3359375, + "x": 954.5559997558594, "y": 483.53125, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 133, + "width": 132.55987548828125, "height": 75, "seed": 736680902, "groupIds": [], @@ -802,7 +802,7 @@ "id": "hhODwDUSnKDNHxeWgdBRh" } ], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -817,8 +817,8 @@ }, { "type": "ellipse", - "version": 234, - "versionNonce": 71498449, + "version": 238, + "versionNonce": 841961733, "isDeleted": false, "id": "1H3J1TVatGqsTmeb03PzM", "fillStyle": "hachure", @@ -838,14 +838,14 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "text", - "version": 542, - "versionNonce": 295409343, + "version": 549, + "versionNonce": 1206775243, "isDeleted": false, "id": "eMUtrGSf4_tdjT-SgVl6r", "fillStyle": "hachure", @@ -858,14 +858,14 @@ "y": 216.8515625, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 128, + "width": 127.57986450195312, "height": 25, "seed": 276931526, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -880,8 +880,8 @@ }, { "type": "text", - "version": 200, - "versionNonce": 412973233, + "version": 207, + "versionNonce": 1753802853, "isDeleted": false, "id": "I00FPxjJzkybs748xvxYQ", "fillStyle": "hachure", @@ -894,14 +894,14 @@ "y": 210.4375, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 10, + "width": 10.319992065429688, "height": 25, "seed": 654279366, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135037, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -916,8 +916,8 @@ }, { "type": "text", - "version": 116, - "versionNonce": 1687709407, + "version": 125, + "versionNonce": 247892555, "isDeleted": false, "id": "MNcWXxi6VbZaulu3K670q", "fillStyle": "hachure", @@ -926,34 +926,34 @@ "roughness": 1, "opacity": 100, "angle": 0, - "x": 901.361328125, + "x": 902.5613327026367, "y": 215.78125, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 89, + "width": 86.77992248535156, "height": 75, "seed": 1687297177, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135038, + "updated": 1705598138238, "link": null, "locked": false, "fontSize": 20, "fontFamily": 1, - "text": "Itinarary\nList\nFilter", + "text": "Itinerary\nList\nFilter", "textAlign": "center", "verticalAlign": "middle", "containerId": null, - "originalText": "Itinarary\nList\nFilter", + "originalText": "Itinerary\nList\nFilter", "lineHeight": 1.25, "baseline": 68 }, { "type": "rectangle", - "version": 496, - "versionNonce": 481114769, + "version": 500, + "versionNonce": 41456581, "isDeleted": false, "id": "gL_hDnXZ2lRjaViYaG2rV", "fillStyle": "hachure", @@ -978,14 +978,14 @@ "id": "hhODwDUSnKDNHxeWgdBRh" } ], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "line", - "version": 120, - "versionNonce": 1002844927, + "version": 124, + "versionNonce": 1843345163, "isDeleted": false, "id": "gF_BvGrwKBQV_s0LLt7II", "fillStyle": "hachure", @@ -1007,7 +1007,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": null, @@ -1028,8 +1028,8 @@ }, { "type": "line", - "version": 90, - "versionNonce": 1898561649, + "version": 94, + "versionNonce": 1276891941, "isDeleted": false, "id": "6V31n7Wzh9bRD4MWf72QE", "fillStyle": "hachure", @@ -1051,7 +1051,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": null, @@ -1072,8 +1072,8 @@ }, { "type": "line", - "version": 152, - "versionNonce": 1604680479, + "version": 156, + "versionNonce": 1922702763, "isDeleted": false, "id": "jItuiRV-cqbnZuN1BUg5k", "fillStyle": "hachure", @@ -1095,7 +1095,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": null, @@ -1116,8 +1116,8 @@ }, { "type": "line", - "version": 123, - "versionNonce": 1943702097, + "version": 127, + "versionNonce": 836773509, "isDeleted": false, "id": "YXFr7rhGIICmJAWKZ5eUK", "fillStyle": "hachure", @@ -1139,7 +1139,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false, "startBinding": null, @@ -1160,8 +1160,8 @@ }, { "type": "rectangle", - "version": 356, - "versionNonce": 883343167, + "version": 360, + "versionNonce": 2021601355, "isDeleted": false, "id": "M76RD0PeJrkYP9LuS_Kxu", "fillStyle": "hachure", @@ -1186,14 +1186,14 @@ "id": "uTKhXBXl80XXPjGsftdJa" } ], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "rectangle", - "version": 133, - "versionNonce": 1570183217, + "version": 137, + "versionNonce": 914558437, "isDeleted": false, "id": "NLnBzR8OLk5gbeRQGwI9f", "fillStyle": "hachure", @@ -1218,14 +1218,14 @@ "id": "i6hMn3CPVbRxyPcniV7yb" } ], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false }, { "type": "text", - "version": 80, - "versionNonce": 448341841, + "version": 86, + "versionNonce": 828960491, "isDeleted": false, "id": "QxjDVUdnC9uReskEwKjsd", "fillStyle": "hachure", @@ -1250,7 +1250,7 @@ "type": "arrow" } ], - "updated": 1704982138417, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -1265,8 +1265,8 @@ }, { "type": "text", - "version": 80, - "versionNonce": 1615260177, + "version": 86, + "versionNonce": 689047877, "isDeleted": false, "id": "zcbS0wgQbYVDRmrAUTDaV", "fillStyle": "hachure", @@ -1286,7 +1286,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960293, "link": null, "locked": false, "fontSize": 20, @@ -1301,8 +1301,8 @@ }, { "type": "rectangle", - "version": 226, - "versionNonce": 832812785, + "version": 230, + "versionNonce": 803330443, "isDeleted": false, "id": "sVoxOi_goA0Vz9JvN_EuG", "fillStyle": "hachure", @@ -1327,14 +1327,14 @@ "type": "arrow" } ], - "updated": 1704982142587, + "updated": 1705593960294, "link": null, "locked": false }, { "type": "text", - "version": 72, - "versionNonce": 81887217, + "version": 79, + "versionNonce": 451582117, "isDeleted": false, "id": "5bXiMRSAbkBVDNzuMHYjg", "fillStyle": "hachure", @@ -1347,14 +1347,14 @@ "y": 500.25, "strokeColor": "#000000", "backgroundColor": "transparent", - "width": 119, + "width": 118.83987426757812, "height": 25, "seed": 926646726, "groupIds": [], "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960294, "link": null, "locked": false, "fontSize": 20, @@ -1369,8 +1369,8 @@ }, { "type": "line", - "version": 155, - "versionNonce": 1407939487, + "version": 159, + "versionNonce": 1361342507, "isDeleted": false, "id": "Ugnzj7K6hXFkke4frMlUY", "fillStyle": "hachure", @@ -1392,7 +1392,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982135038, + "updated": 1705593960294, "link": null, "locked": false, "startBinding": null, @@ -1413,8 +1413,8 @@ }, { "type": "text", - "version": 681, - "versionNonce": 1609777361, + "version": 687, + "versionNonce": 364526597, "isDeleted": false, "id": "5pmOYWhziuLQ_DZANfOzI", "fillStyle": "hachure", @@ -1434,7 +1434,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982452010, + "updated": 1705593960294, "link": null, "locked": false, "fontSize": 19.409722222222214, @@ -1449,8 +1449,8 @@ }, { "type": "ellipse", - "version": 377, - "versionNonce": 1136001105, + "version": 381, + "versionNonce": 1729835723, "isDeleted": false, "id": "-Wb1113k5o16q_0IwIAB8", "fillStyle": "hachure", @@ -1475,14 +1475,14 @@ "id": "3FvznihDEqVpPp0WjjZ26" } ], - "updated": 1704982236097, + "updated": 1705593960294, "link": null, "locked": false }, { "type": "arrow", - "version": 907, - "versionNonce": 1010622481, + "version": 911, + "versionNonce": 293499749, "isDeleted": false, "id": "3FvznihDEqVpPp0WjjZ26", "fillStyle": "hachure", @@ -1504,7 +1504,7 @@ "type": 2 }, "boundElements": [], - "updated": 1704982236097, + "updated": 1705593960294, "link": null, "locked": false, "startBinding": { @@ -1533,8 +1533,8 @@ }, { "type": "text", - "version": 396, - "versionNonce": 8009937, + "version": 402, + "versionNonce": 576758123, "isDeleted": false, "id": "mO-wquP1JTkteitq9b6D4", "fillStyle": "hachure", @@ -1554,7 +1554,7 @@ "frameId": null, "roundness": null, "boundElements": [], - "updated": 1704982474848, + "updated": 1705593960294, "link": null, "locked": false, "fontSize": 20, diff --git a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.svg b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.svg index 087866ea971..6cf23afb7a3 100644 --- a/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.svg +++ b/src/main/java/org/opentripplanner/routing/algorithm/filterchain/images/ItineraryListFilterChain.svg @@ -18,4 +18,4 @@ - Comparator<Itinerary>ItineraryListFilterChain*GroupByFilter<GroupId>nestedFilters*ItinararyListFilterDecorateFilterRemoveFilterSortingFilterRemoveItineraryFlagger---name()shouldBeFlaggedForRemoval()skipAlreadyFlaggedItineraries()ItineraryDecorator---decorate(Itinerary) \ No newline at end of file + Comparator<Itinerary>ItineraryListFilterChain*GroupByFilter<GroupId>nestedFilters*ItineraryListFilterDecorateFilterRemoveFilterSortingFilterRemoveItineraryFlagger---name()shouldBeFlaggedForRemoval()skipAlreadyFlaggedItineraries()ItineraryDecorator---decorate(Itinerary) \ No newline at end of file