Solved

Java iterate through different levels of childs

Posted on 2012-04-03
2
262 Views
Last Modified: 2013-11-24
I'm creating a mindmapping application
as of now I have a Node class. This Node object can have several Node objects as childs ( a list of Nodes).

Now as this can have several levels deep how do you iterate through all these Nodes?
0
Comment
Question by:Mutsop
2 Comments
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 500 total points
ID: 37802542
Are they arranged in a tree? If so I suggest you look at this http://en.wikipedia.org/wiki/Tree_traversal . There are different ways of going through the tree.
0
 
LVL 3

Author Closing Comment

by:Mutsop
ID: 37803103
aah haven't thought about it
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
table example 4 29
servlet example issue 6 38
servlet filter example 37 59
One Standard Deviation from the Mean 2 24
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article provides a brief introduction to tissue engineering, the process by which organs can be grown artificially. It covers the problems with organ transplants, the tissue engineering process, and the current successes and problems of the tec…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question