aspose file tools
The moose likes Java in General and the fly likes Could you criticize my implementation of the Tree? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Could you criticize my implementation of the Tree?" Watch "Could you criticize my implementation of the Tree?" New topic
Author

Could you criticize my implementation of the Tree?

Vladimir Bezugliy
Ranch Hand

Joined: Sep 29, 2004
Posts: 33
Could you criticize my implementation of the Tree?
Code locates here - http://jroller.com/page/vbez
Joseph Maddison
Ranch Hand

Joined: Nov 04, 2004
Posts: 53
It was hard for me to understand just what you were trying to do with the code. Maybe it would be useful to just spell that out.

One thing I noticed is that your delete node method does not recursively remove children and grand-children of the node to be removed, first, so they get orphaned when their ancestr gets whacked. Depending on the function of the tree, this may not be a big deal, but I thought I would mention it.

Also, I'm not sure that it is all that useful to have the serialization/externalization use XML. Unless there's a specific reason why not, you might as well serialize the entire tree and write it as an ObjectStream. It should do the job just as well, unless you need to be able to modify the data in the serialized state.

HTH,
jdmaddison
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Could you criticize my implementation of the Tree?
 
Similar Threads
Netbeans or Eclipse
playboy and eclipse
Any good Blog sites ?
Javaranch Hacked !!!!!
Can I debug JSP+Javabeans in Eclipse?