Skip to content

Commit

Permalink
refactor: Rename ToveUtils to TroveUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
t2gran committed Nov 4, 2024
1 parent 9890d0f commit 1831172
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.HashSet;
import java.util.Set;

public class ToveUtils {
public class TroveUtils {

public static <U> void addToMapSet(TLongObjectMap<Set<U>> mapSet, long key, U value) {
Set<U> set = mapSet.get(key);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
Expand Down Expand Up @@ -62,7 +62,7 @@ public boolean exists(T element) {
public List<Set<T>> sets() {
TLongObjectMap<Set<T>> 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
});
}
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 1831172

Please sign in to comment.