Java implementation of the queue data structure.