I have
Just a list of Device Objects, each Object contains a deviceId and name variable (both Strings).
I already have the operations performed to load the list with values. I also have this list:
This list of Objects has one variable -
String deviceId; I just need to take every deviceId variable from the first list and populate the second list with ProjectDevice Objects, using the deviceIds from the first list as the variable.
Im sure I can do this, but the only ways I can think of doing this would involve 10-20 lines of code I would guess, and I am just wondering if there is an easier way, like some kind of method that already exists to do something like this.
I have heard of a way to cast from one Object to the next, but have never done so and don't really know how, but if that is what I should look into please let me know. Or if there is a simpler way, please let me know.
Thanks
What I am tring to find that seems to be easiest would be the right for statement. In pseudo:
Seems like it could work if my deviceList were a class and not a list of classes. Is there a way to get that to work?