|Introduction to OOP||Chapter 19: Container Classes :||next||previous||audio||real||text|
Not exactly. The iterator is usually developed by the same programmer creating the data structure. It can share detailed knowledge with the data structure. And using the iterator does not require any knowledge of how the iterator is implemented.
Often friends (in C++) or nested classes (in Java) can be used to help the iterator share information with the container.