title: Is there a Queue (PriorityQueue) implementation which is also a Set?
body: <p>I'm looking for a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/PriorityQueue.html" rel="noreferrer">PriorityQueue</a> implementation which is also a <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" rel="noreferrer">Set</a>.</p>
  
  <p>The <code>compareTo</code> implementation if its elements must not have the requirement to be consistent with the implementation of <code>equals</code>.</p>
  
  <p>Is there somewhere such a implementation for java?</p>
  
  <p><strong>Update:</strong> I implemented it now using a SortedSet as the internal collection. So I only had to implement the missing methods to satisfy the queue interface. I also forgot to mention that it also had to be a bounded queue, so it features a capacity and discards the last element of the set if capacity is reached.</p>