/* * iterator.txt * Copyright (c) 2023 Mark Maloof. All Rights Reserved. See LICENSE. */ template class List; // required forward declaration template class ListIterator { friend class List; public: ListIterator(); bool hasNext() const; bool hasPrevious() const; T &next(); // throws NoSuchObject T &previous(); // throws NoSuchObject void set( const T & ) const; // throws NoSuchObject void printInternal() const; private: Node *current; bool before; }; // ListIterator class