Size-limited queue that holds last N elements in Java
A very simple & quick question on Java libraries: is there a ready-made class that implements a Queue with a fixed maximum size – i.e. it always allows addition of elements, but it will silently remove head elements to accomodate space for newly added elements. Of course, it’s trivial to implement it manually: import java.util.LinkedList; … Read more