CircularFifoQueue
CircularFifoQueue is a first-in first-out queue with a fixed size that replaces its oldest element if full.
The removal order of a CircularFifoQueue is based on the insertion order; elements are removed in the same order in which they were added. The iteration order is the same as the removal order.
The add, remove, peek, poll, offer operations all perform in constant time. All other operations perform in linear time or worse.
This queue prevents null objects from being added.
Since
4.0
Parameters
<E>
the type of elements in this collection