template class List; // required forward declaration template class ListIterator { friend class List; public: ListIterator(); bool hasNext() const; bool hasPrevious() const; T &next() throw ( NoSuchObject ); T &previous() throw ( NoSuchObject ); void printInternal() const; private: Node *current; bool before; };