Is there any collection which allows me limit the number of elements allowed?
What I need is a collection with size of 5 elements, when this collection is full, a new element can be added, but the oldest element of this collection will be replaced for the new element.