Watch
2
0
Fork
You've already forked jorchard
0
Tree types
  • Java 99.9%
  • CSS 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford 1c3a532af7
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:55 +01:00
.forgejo Update workflows. 2026-07-31 18:42:55 +01:00
com.io7m.jorchard.core Begin next development iteration. 2024-05-12 12:18:06 +00:00
com.io7m.jorchard.generators Begin next development iteration. 2024-05-12 12:18:06 +00:00
com.io7m.jorchard.tests Begin next development iteration. 2024-05-12 12:18:06 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:58 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:44 +00:00
.gitmodules Move to new organization. 2024-04-30 19:56:24 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:46 +01:00
pom.xml Migrate project. 2026-06-27 10:10:31 +01:00
README-CHANGES.xml Mark release 2.0.2 2024-05-12 12:17:58 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:07:24 +00:00
README.in Migrate project. 2026-06-27 10:10:31 +01:00
README.md Migrate project. 2026-06-27 10:10:31 +01:00

jorchard

Maven Central Maven Central (snapshot) Java Version

com.io7m.jorchard

jorchard

A generic unbalanced rose tree implementation.

Features

Usage

Assuming an arbitrary type T, create a tree with a root value of x of type T:

var t = JOTreeNode.create(x);

Add nodes to the tree:

var t0 = JOTreeNode.create(y0);
var t1 = JOTreeNode.create(y1);
var t2 = JOTreeNode.create(y2);

t0.setParent(t);
t1.setParent(t);
t2.setParent(t);

Iterate over the tree:

t.forEachDepthFirst(order, (input, depth, node) -> {
  // ...
});

t.forEachBreadthFirst(order, (input, depth, node) -> {
  // ...
});

Detach nodes from the tree:

t2.detach();