Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10344
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Collection to implement linked structure traverse up and down |
| Date | 2011-11-29 17:01 -0800 |
| Organization | Canadian Mind Products |
| Message-ID | <pfvad7p2lbi1p51capdqffqjaebcm13aca@4ax.com> (permalink) |
| References | <68dffbe9-ba9e-4daa-9bab-deac913b2cfe@t38g2000prg.googlegroups.com> |
On Sun, 27 Nov 2011 23:53:30 -0800 (PST), ruds <rudranee@gmail.com> wrote, quoted or indirectly quoted someone who said : >Please tell me am i on the right path? There are two kinds of links: 1. links which define which objects are in the Set and how to find them. 2. links that define interrelationships between the objects. I would expect things to become clearer if you expected of your Collection to handle type (1), and you handled type (2) yourself independent of the Collection. I might help to recall it is possible to have a HashMap an ArrayList and a TreeSet simultaneously all on the same group of objects. So in your case you can have a Map for finding things, and a completely independent set of links defining your directed graph (to use the mathematical name for such a generic structure). If it is truly a tree, don't forget about JTree. see http://mindprod.com/jgloss/treeset.html http://mindprod.com/jgloss/treemap.html http://mindprod.com/jgloss/jtree.html http://mindprod.com/jgloss/tree.html -- Roedy Green Canadian Mind Products http://mindprod.com For me, the appeal of computer programming is that even though I am quite a klutz, I can still produce something, in a sense perfect, because the computer gives me as many chances as I please to get it right.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Collection to implement linked structure traverse up and down ruds <rudranee@gmail.com> - 2011-11-27 23:53 -0800
Re: Collection to implement linked structure traverse up and down Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-11-28 07:32 -0400
Re: Collection to implement linked structure traverse up and down Wayne <nospam@all.invalid> - 2011-12-01 10:39 -0500
Re: Collection to implement linked structure traverse up and down ruds <rudranee@gmail.com> - 2011-12-04 23:57 -0800
Re: Collection to implement linked structure traverse up and down Lew <lewbloch@gmail.com> - 2011-12-05 15:08 -0800
Re: Collection to implement linked structure traverse up and down ruds <rudranee@gmail.com> - 2011-12-05 21:55 -0800
Re: Collection to implement linked structure traverse up and down Roedy Green <see_website@mindprod.com.invalid> - 2011-11-29 17:01 -0800
Re: Collection to implement linked structure traverse up and down Henk van Voorthuijsen <voorth@xs4all.nl> - 2011-12-05 02:41 -0800
Re: Collection to implement linked structure traverse up and down Martin Gregorie <martin@address-in-sig.invalid> - 2011-11-30 21:17 +0000
csiph-web