Is there an existing implementation for this in Java? ... Example for a queue with max 10 elements: queue .... Java PriorityQueue with fixed size.
stackoverflow.com