Skip to content

Tag: hierarchy

Create child nodes using recursion

I’m trying to create a hierarchy from flat data. I have the following Node definition: Given this data: [Person,Manager,Hourly,New], where the tree should be like: I’ve tried the following: And my createNode method is: But conceptually I don’t understand how to maintain the structure if Java…