| Implements a traditional circular queue, except that it will enlarge
backing array if it runs out of space.
Also implements the Collection API, except for remove methods.
This implementation leaves all synchronization to the caller.
The implementation is optimized to make add(Object) and Object next()
operations as cheap as possible. size, isEmpty and peek are also very
cheap. Other operations may be considerably more expensive.
The iterator supplied does NOT support fast-fail on modification.
Inspired by _Data Structure and Algorithms_ by Aho, Hopcroft and Ullman.
|