From 183117248598de09e43f62143fc849a8706bc32c Mon Sep 17 00:00:00 2001 From: Thomas Gran Date: Mon, 4 Nov 2024 14:22:29 +0100 Subject: [PATCH] refactor: Rename ToveUtils to TroveUtils --- .../collection/{ToveUtils.java => TroveUtils.java} | 2 +- .../graph_builder/module/osm/DisjointSet.java | 4 ++-- .../graph_builder/module/osm/OsmDatabase.java | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename application/src/main/java/org/opentripplanner/framework/collection/{ToveUtils.java => TroveUtils.java} (93%) diff --git a/application/src/main/java/org/opentripplanner/framework/collection/ToveUtils.java b/application/src/main/java/org/opentripplanner/framework/collection/TroveUtils.java similarity index 93% rename from application/src/main/java/org/opentripplanner/framework/collection/ToveUtils.java rename to application/src/main/java/org/opentripplanner/framework/collection/TroveUtils.java index 5958845e2b5..d3b59624eb9 100644 --- a/application/src/main/java/org/opentripplanner/framework/collection/ToveUtils.java +++ b/application/src/main/java/org/opentripplanner/framework/collection/TroveUtils.java @@ -4,7 +4,7 @@ import java.util.HashSet; import java.util.Set; -public class ToveUtils { +public class TroveUtils { public static void addToMapSet(TLongObjectMap> mapSet, long key, U value) { Set set = mapSet.get(key); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/DisjointSet.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/DisjointSet.java index 369e5c20a14..d130a435eaf 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/DisjointSet.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/DisjointSet.java @@ -9,7 +9,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; -import org.opentripplanner.framework.collection.ToveUtils; +import org.opentripplanner.framework.collection.TroveUtils; /** Basic union-find data structure with path compression */ class DisjointSet { @@ -62,7 +62,7 @@ public boolean exists(T element) { public List> sets() { TLongObjectMap> out = new TLongObjectHashMap<>(); setMapping.forEachEntry((k, v) -> { - ToveUtils.addToMapSet(out, compact(v), k); + TroveUtils.addToMapSet(out, compact(v), k); return true; }); return new ArrayList<>(out.valueCollection()); diff --git a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java index 382b206a053..0781b73f076 100644 --- a/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java +++ b/application/src/main/java/org/opentripplanner/graph_builder/module/osm/OsmDatabase.java @@ -24,7 +24,7 @@ import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.geom.LineString; import org.locationtech.jts.geom.Point; -import org.opentripplanner.framework.collection.ToveUtils; +import org.opentripplanner.framework.collection.TroveUtils; import org.opentripplanner.framework.geometry.GeometryUtils; import org.opentripplanner.framework.geometry.HashGridSpatialIndex; import org.opentripplanner.graph_builder.issue.api.DataImportIssueStore; @@ -267,7 +267,7 @@ public void addWay(OsmWay way) { way .getNodeRefs() .forEach(node -> { - ToveUtils.addToMapSet(areasForNode, node, way); + TroveUtils.addToMapSet(areasForNode, node, way); return true; }); } @@ -738,7 +738,7 @@ private void processMultipolygonRelations() { while (wayNodeIterator.hasNext()) { long nodeId = wayNodeIterator.next(); if (nodesById.containsKey(nodeId)) { - ToveUtils.addToMapSet(areasForNode, nodeId, way); + TroveUtils.addToMapSet(areasForNode, nodeId, way); } else { // this area is missing some nodes, perhaps because it is on // the edge of the region, so we will simply not route on it.