title: Adding additional logic to Java Collection
body: <p>I have 3 different TreeSet objects in my application, all of which store the same class of object.</p>
  
  <p>However, at any one point of time, a single object may exist in only one of the TreeSets.</p>
  
  <p>So, if I queried each TreeSet using contains() for a particular object it should exist in only one of them.</p>
  
  <p>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?</p>
  
  <p>Thanks</p>