Interface java.util.Iterator
An example can be found with class ElementIterator,
which is an iterator over NodePositionList.
The interface java.util.ListIterator represents an iterator that moves
both directions. It is supported by an iterator in class
java.util.LinkedList. This iterator allows it to be used to represent a
stack, queue, deque, or list. Note also the inheritance chains in the
collection classes.
We next discussed how to automatically keep a "favorites" list, by keeping
track of the number of accesses of an element and moving it up the list
each time it is accessed so that it is in order by number of accesses. The
code can be found at