this is a noobie question regarding tree maps. I read the Java API and other documentation, but it is still unclear how this works.
In my opinion, a tree in java (or any language) is like a family tree; where do you say:
Layer 1 OldestGuy Layer 2 OldGuy1 Oldguy2 OldGuy3 OldGuy4 OldGuy5 Layer 3 Guy1 Guy2 Guy3 Guy4 Guy5 Guy6........ etc
Where level 1 has 1 value (i.e. the central node), and from there in each subsequent layer there can be arbitrary amounts of values ββ(or guys), and some of the "branches" can be longer than others (for example, it can go OldestGuy β OldGuy1 β Guy1 and Guy2 ... Guyn, while at the same time the other branch is just OldestGuy β OldGuy4)
With that in mind, I am trying to add values ββto TreeMap in certain places of certain branches when creating certain connections, but all I seem to get is the same results as HashMap.
(it seems that what I want to do is require something more than TreeMap .... since the key (or layer (?) will be the same for several different values)
Any suggestions / explanations would be fantastic because I feel as though I am seriously barking the wrong tree with this.
I saw examples of this using googles.jar (like a family tree image), but I'm just trying to figure it out, as there seem to be a lot of conflicts between TreeMap and trees and how you can store data in them.
source share