- 
Method Summary
void
 
Adds a new entry to the back of this dequeue. 
 void
 
Adds a new entry to the front of this dequeue. 
 void
 
Removes all entries from the dequeue. 
 
Retrieves the element at the back of this dequeue. 
 
Retrieves the element at the front of this dequeue. 
 boolean
 
Determines if there are any elements in the dequeue. 
 
Removes and returns the element at the back of the dequeue. 
 
Removes and returns the element at the front of the dequeue. 
 
 
 
 
- 
Method Details
- 
addToFrontvoid addToFront(T element) Adds a new entry to the front of this dequeue. 
- Parameters:
- element- element to be added to the dequeue
 
- 
addToBackvoid addToBack(T element) Adds a new entry to the back of this dequeue. 
- Parameters:
- element- element to be added to the dequeue
 
- 
removeFrontRemoves and returns the element at the front of the dequeue.
 The size of the dequeue is decreased by one. 
- Returns:
- The element at the front of the dequeue
- Throws:
- EmptyQueueException- if the dequeue is empty when the method is invoked
 
- 
removeBackRemoves and returns the element at the back of the dequeue.
 The size of the dequeue is decreased by one. 
- Returns:
- The element at the back of the dequeue
- Throws:
- EmptyQueueException- if the dequeue is empty when the method is invoked
 
- 
getFrontRetrieves the element at the front of this dequeue.
 The size of the dequeue is not changed. 
- Specified by:
- getFrontin interface- QueueInterface<T>
- Returns:
- The element at the front of the dequeue.
- Throws:
- EmptyQueueException- if the dequeue is empty when the method is invoked
 
- 
getBackRetrieves the element at the back of this dequeue.
 The size of the dequeue is not changed. 
- Returns:
- The element at the back of the dequeue.
- Throws:
- EmptyQueueException- if the dequeue is empty when the method is invoked
 
- 
isEmptyboolean isEmpty() Determines if there are any elements in the dequeue. 
- Specified by:
- isEmptyin interface- QueueInterface<T>
- Returns:
- True if the dequeue is empty.
 
- 
clearvoid clear() Removes all entries from the dequeue. 
- Specified by:
- clearin interface- QueueInterface<T>