Tree data structure in Java



I am hoping to use a tree data structure in my Java application. I need to
be able to create a tree which I can add next nodes to certain paths and
obtain a list of all possible paths in the tree. Is there an implementation
of this built into Java? For example, I would like to create a structure
similar to this:

A1
/ \
M1 C3
/ | \ / \
D S E R Ts
/\
4 6

Basically each node is labelled with a String, I dont want the data being
sorted. And I want to iterate through all paths to get a list like:

A1, M1, D
A1, M1, S
A1, M1, E
A1, C3, R, 4
A1, C3, R, 6
A1, C3, TS

If there is an existing implementation, is there any docs on how to use it?

Many Thanks
Allan


.



Relevant Pages

  • Re: How do I use Comparators?
    ... I am writing a red-black tree class. ... > I will just say I am taking this course, learning Java as I go. ... > methods work. ... IBM Australia - Tivoli Security Software ...
    (comp.lang.java.help)
  • Re: Java Newbie challenge
    ... The java built in structures are, for example, all of the collection ... store a tree in RAM. ... You could use objects with a mother and father parent pointer. ...
    (comp.lang.java.help)
  • Re: Java and Large Applications
    ... > I just spent the morning fixing my umpteenth "memory leak" in a large ... > tree root to null. ... > I considered the idea of rewriting my Java app in C. ... it clearly states that setting pointers to null to ...
    (comp.lang.java.programmer)
  • Java and Large Applications
    ... I just spent the morning fixing my umpteenth "memory leak" in a large ... tree root to null. ... I considered the idea of rewriting my Java app in C. ... So much for garbage collection. ...
    (comp.lang.java.programmer)
  • Re: JTree control
    ... I'm a C/C++ programmer, I work on Java by 1 month and I'm really happy with Java! ... I'm using the Swing's JTree control; I create a JTree on a panel and I add some nodes and at the end the leaf. ... node without notifying the tree using one of the appropriate methods in the tree model. ...
    (comp.lang.java.gui)