Class Deque

java.lang.Object
  |
  +--Queue
        |
        +--Deque
Direct Known Subclasses:
Meque

public class Deque
extends Queue

The Deque class is an extension of the Queue class It adds methods which allow both enqueueing and dequeueing from either end of the queue, and has methods to "peek" at the ends of the queue without removing them


Field Summary
 
Fields inherited from class Queue
back, front
 
Constructor Summary
Deque()
          Methods inherited from Queue: boolean isEmpty() String toStrin()
 
Method Summary
 java.lang.Object dequeue()
           
static java.lang.Object dequeue(Deque D)
           
 java.lang.Object dequeueBack()
           
static java.lang.Object dequeueBack(Deque D)
           
 void enqueue(java.lang.Object o)
           
static void enqueue(java.lang.Object o, Deque D)
           
 void enqueueFront(java.lang.Object o)
           
static void enqueueFront(java.lang.Object o, Deque D)
           
static void main(java.lang.String[] arg)
           
 java.lang.Object peekBack()
          This method returns the object stored at the back of the Deque without removing it
 java.lang.Object peekFront()
          This method returns the object stored at the front of the Deque without removing it
 
Methods inherited from class Queue
dequeue, enqueue, isEmpty, isEmpty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Deque

public Deque()
Methods inherited from Queue: boolean isEmpty() String toStrin()

Method Detail

peekFront

public java.lang.Object peekFront()
This method returns the object stored at the front of the Deque without removing it


peekBack

public java.lang.Object peekBack()
This method returns the object stored at the back of the Deque without removing it


enqueue

public void enqueue(java.lang.Object o)
Overrides:
enqueue in class Queue

enqueue

public static void enqueue(java.lang.Object o,
                           Deque D)

enqueueFront

public void enqueueFront(java.lang.Object o)

enqueueFront

public static void enqueueFront(java.lang.Object o,
                                Deque D)

dequeue

public java.lang.Object dequeue()
Overrides:
dequeue in class Queue

dequeue

public static java.lang.Object dequeue(Deque D)

dequeueBack

public java.lang.Object dequeueBack()

dequeueBack

public static java.lang.Object dequeueBack(Deque D)

main

public static void main(java.lang.String[] arg)