Tree

Hi,

I have 4 questions.

1- i want to store my objects in tree because they are hierarchical and behave like tree nodes that start with one root. but should i consider any dependency between my objects(Top object and Butt Objects) as attributs or tree solves such dependencies? if tree could maintain the refrence too all objects inserted to tree how could i load one object without loading all object in tree(for performance issue)

2- suppose class A Instances should be maintain in a tree. class B extended class A and like class A its objects need to be in a tree. the question is how could i design and implement this?

3- is there any good implementation of tree in java?

4- what will happens on my DAO class(Im using DAO and TO pattern)? should it load a tree object instead of simple TO?

i would appreciate even for one answer!

[876 byte] By [Sarah_Mahdavia] at [2007-10-2 21:08:58]
«« Very Weird ?
»» exec
# 1
I will answer the question I can understand: (3) The javax.swing.tree.DefaultMutableTreeNode class works perfectly well as the node of a tree data structure.
DrClapa at 2007-7-13 23:54:53 > top of Java-index,Other Topics,Algorithms...
# 2
> The javax.swing.tree.DefaultMutableTreeNode class works perfectly well as the node of a tree data structure.If you don't mind having casts all over the place.
YAT_Archivista at 2007-7-13 23:54:53 > top of Java-index,Other Topics,Algorithms...