Skip to content

Commit 85735a7

Browse files
committed
Improve documentation
1 parent defb5ff commit 85735a7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/org/openstreetmap/josm/data/osm/NodeGraph.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.openstreetmap.josm.tools.Pair;
2424

2525
/**
26-
* A directed or undirected graph of nodes.
26+
* A directed or undirected graph of nodes. Nodes are connected via edges represented by NodePair instances.
2727
*
2828
* @since 12463 (extracted from CombineWayAction)
2929
*/
@@ -211,8 +211,10 @@ public Set<Node> getNodes() {
211211
}
212212

213213
/**
214-
* Creates a lookup table from the existing edges to make querying possible.
215-
* @return a map containing all the graph data, where the key is queryable, values are direct successors of the key node
214+
* Constructs a lookup table from the existing edges in the graph to enable efficient querying.
215+
* This method creates a map where each node is associated with a list of nodes that are directly connected to it.
216+
*
217+
* @return A map representing the graph structure, where nodes are keys, and values are their direct successors.
216218
* @since xxx
217219
*/
218220
public Map<Node, List<Node>> createMap() {

0 commit comments

Comments
 (0)