Skip to content

Commit d82cbdf

Browse files
committed
added helper
1 parent f5a8acd commit d82cbdf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • jungrapht-visualization/src/main/java/org/jungrapht/visualization/spatial/rtree

jungrapht-visualization/src/main/java/org/jungrapht/visualization/spatial/rtree/RTree.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ public static <T> RTree<T> create() {
5757
return new RTree();
5858
}
5959

60+
// Add this method inside RTree.java
61+
static <T> RTree<T> withRoot(Node<T> root) {
62+
return new RTree<>(root);
63+
}
64+
6065
public static <T> RTree<T> addAll(
6166
RTree<T> rtree,
6267
SplitterContext<T> splitterContext,

0 commit comments

Comments
 (0)