This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am creating an Object to hold a String projectName; and two other variables:
The first is a list of devices, which right now is just a List that belong to each projectName. I also need a List of channels that belong to each device. However I don't think it will work for me to just make this a List as well, because when I perform operations to populate the variables, the channels List will only be populated with the last set of channels it finds (or maybe all the channels for all devices).
If I have a project that has this layout:
It is not a problem to set the String projectName to the one project value, and I can put all the devices in one List without a problem. However the only way I would know to work the channels out in order to show ownership with a device is to create 3 channel List variables, one List to hold each of the channels for each device. And since there may be more or less devices and channels for each project this is a problem.
The end goal is to use this on a rich:tree, but I want to first see what my options are for data types. I really have no idea what would work for this
True wisdom is in knowing you know nothing - Socrates