/** * @return All the {@link Edge}s connected to the start/end {@link Node}s of this {@link Route}, * excluding {@link Edge}s in {@link Route}. If this {@link Edge} is a {@link Route} * with two-way road, then the reversed {@link Edge}s will be included in the set. This * does not include {@link Edge} connected to the interior {@link Node}s of the * {@link Route}. */ public Set<Edge> connectedEdges() { final Set<Edge> result = new HashSet<>(); for (final Edge edge : this.end().end().connectedEdges()) { if (!this.includes(edge)) { result.add(edge); } } for (final Edge edge : this.start().start().connectedEdges()) { if (!this.includes(edge)) { result.add(edge); } } return result; }
.filter(edge -> !candidateRoute.includes(edge)) .filter(edge -> !masterEdgeIdentifiers.contains(edge.getMasterEdgeIdentifier())) .forEach(mergeCandidates::add); .filter(edge -> !masterEdgeIdentifiers.contains(edge.getMasterEdgeIdentifier())) .filter(edge -> isMergeCandidateEdge(edge, candidateRoute, junctionEdgeIds)) .filter(edge -> !candidateRoute.includes(edge)).forEach(mergeCandidates::add);
if (this.includes(lastOverlap))
for (final Edge edge : members) if (route.includes(edge))
private boolean canAddEdgeToBoundary(final Edge edge, final Route boundary) { return edge.getIdentifier() != -boundary.end().getIdentifier() && edge.getOsmIdentifier() == boundary.end().getOsmIdentifier() && boundary.end().end().getLocation().equals(edge.start().getLocation()) && !boundary.includes(edge); } }