- give
Analagous to add(), however, we do not use the standard naming convention, to
avoid interface clashe
- forEach
- isEmpty
Fastest way to tell if the queue is drained.
- clear
Removes all items in the queue. head = tail;
- remove
Manually remove the item from queue. O(n) performance.
- take
Analagous to poll(); retrieves and removes head. We avoid the use of standard
queue naming methods,
- contains
Check if this queue contains the given item. O(n) performance. You may want to
use a Set unless you
- size
Return a count of items in the queue. Default implementation uses a counter;
subclasses may have O(n