I have 2 linked lists.
I have the same object in both of those lists. By same object, I mean the object has the same state, but is referenced by a different object pointer.
I can call .remove(object);
from the first list to remove it, but if I do the same for the second list it is not removed (because the object pointer reference is different)
Is there an easy way to remove objects with the same state from various lists?
Thinking about it, I will probably loop through the second list comparing state on its objects, but I was looking for a cleaner way