Logo Data Structures and Algorithms with Object-Oriented Design Patterns in C++
next up previous contents index

Accessors

Three LinkedList<T> class member variable accessors are defined in Program gif. The member functions Head and Tail provide read-only access to the corresponding data members of LinkedList<T>. The function IsEmpty returns a Boolean result which indicates whether the list is empty. Clearly, the running time of the of the accessors is O(1).

   program3583
Program: LinkedList<T> Class Accessor Function Definitions


next up previous contents index

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