The definitions of the member functions of the `ListElement<T>`
class are given in Program .
Altogether, there are three functions--a constructor and two accessors.

**Program:** `ListElement<T>` Class Member Function Definitions

The constructor simply initializes the member variable to the passed values.
The running time of the constructor is ,
where is the running time of the copy constructor for
objects of class `T`.
Assigning a value to the `next` field takes a constant amount of time.

The two accessor functions, `Datum` and `Next`,
simply return the values of the corresponding member variables.
Clearly, the running times of each of these functions is *O*(1).
Note that if `Datum` had been defined as returning a `T`,
rather than a *reference* to `T`,
the assumption of constant running time would not be valid.

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