I have 3 different TreeSet objects in my application, all of which store the same class of object.
However, at any one point of time, a single object may exist in only one of the TreeSets.
So, if I queried each TreeSet using contains() for a particular object it should exist in only one of them.
Is there an easy way to add this kind of logic to my TreeSet easily? Obviously I can perform the above contains() check myself after each operation but just wondering if there are better ways?
Thanks