Cover Data Structures and Algorithms with Object-Oriented Design Patterns in Java
next up previous contents index

Linked List Implementation

Program gif defines a linked-list implementation of a deque. The DequeAsLinkedList class extends the QueueAsLinkedList class introduced in Program gif and implements the Deque interface defined in Program gif. The QueueAsLinkedList implementation provides almost all of the required functionality. Only five of the six methods defined in the Deque interface need to be implemented.

   program7875
Program: DequeAsLinkedList class ``Head'' methods.




next up previous contents index

Bruno Copyright © 1998 by Bruno R. Preiss, P.Eng. All rights reserved.