title: Java Attribute Driven Collection
body: <p>I need to implement some specific functionality and I am wondering if you might know of a java library that does this, or something like it already. I would rather use an existing before building my own.</p>
  
  <p>Basically I want a collection type class that contains instances of <em>FooBar</em>. When the container is constructed, I specify the attribute values or ranges that qualify a FooBar for membership, so when a FooBar instance is inserted, it will be rejected if it does not meet the criteria. In addition, if the attributes of any FooBar in the container are modified in such a way that they no longer meet the membership criteria, they will be ejected (preferably with some sort of callback to registered listeners).</p>
  
  <p>I can elaborate more, but I think the concept is fairly straight forward.</p>
  
  <p>Seen anything like that ?</p>
  
  <p>Thanks.</p>