KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm looking for a PriorityQueue implementation which is also a Set . The compareTo implementation if its elements must not have the requirement to be consistent with the implementation of equals . Is there somewhere such a implementation for java? Update: 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.
Tags (comma-separated)
Save Edits
Cancel