H
Hal Vaughan
I think if I weren't self taught, I'd know the terms to describe what I'm
trying to do and might even know what kind of class to look for in the Java
API. I'm hoping there's a Java class that will do what I need to do. I
think it's some kind of tree structure, but I've only heard the term used
and what I found (like TreeMap) doesn't seem to do what I need. Any info I
find on Trees, though, seems to go back to JTree and I don't need a GUI for
this.
I have a number of data tables and many of them have dependent tables based
on matching certain criteria. These dependent tables often have other
dependent tables. There is no limit to the levels of dependents and to the
number of dependents for each table, but in reality, I doubt any would go
deeper than 5-6 levels.
I have a list of the main tables and each table has its own list of its
immediate dependents (isn't the correct term children?) and, of course,
each child has a list of its own children and so on.
This has worked fine so far, but if a main table is modified, I need to
update all the tables that depend on it, no matter how many levels removed.
There are more details I don't want to go into, but what I'd like to do is
have one structure that a main table has access to that is a list of all
the dependent tables. I can't use a regular list for this because I need
for all the tables at one level to be listed at that level. I was thinking
of something like a LinkedList of LinkedLists.
For instance, the main table would be the first item in the main LinkedList.
The 2nd item would be a LinkedList of all it's children and the 3rd item
would be a another LinkedList of all the grandchilren and so on.
Yes, I can do this with lists of lists, but isn't here some kind of tree or
other kind of branching list that will do this?
Thanks for suggestions!
Hal
trying to do and might even know what kind of class to look for in the Java
API. I'm hoping there's a Java class that will do what I need to do. I
think it's some kind of tree structure, but I've only heard the term used
and what I found (like TreeMap) doesn't seem to do what I need. Any info I
find on Trees, though, seems to go back to JTree and I don't need a GUI for
this.
I have a number of data tables and many of them have dependent tables based
on matching certain criteria. These dependent tables often have other
dependent tables. There is no limit to the levels of dependents and to the
number of dependents for each table, but in reality, I doubt any would go
deeper than 5-6 levels.
I have a list of the main tables and each table has its own list of its
immediate dependents (isn't the correct term children?) and, of course,
each child has a list of its own children and so on.
This has worked fine so far, but if a main table is modified, I need to
update all the tables that depend on it, no matter how many levels removed.
There are more details I don't want to go into, but what I'd like to do is
have one structure that a main table has access to that is a list of all
the dependent tables. I can't use a regular list for this because I need
for all the tables at one level to be listed at that level. I was thinking
of something like a LinkedList of LinkedLists.
For instance, the main table would be the first item in the main LinkedList.
The 2nd item would be a LinkedList of all it's children and the 3rd item
would be a another LinkedList of all the grandchilren and so on.
Yes, I can do this with lists of lists, but isn't here some kind of tree or
other kind of branching list that will do this?
Thanks for suggestions!
Hal