While in general this class conforms to the {@link Iterator} interface,it is important to note that all iterators for stored collections must be explicitly closed with {@link #close()}. The static method {@link #close(java.util.Iterator)} allows calling close for all iterators withoutharm to iterators that are not from stored collections, and also avoids casting. If a stored iterator is not closed, unpredictable behavior including process death may result.
This class implements the {@link Iterator} interface for all storediterators. It also implements {@link ListIterator} because some listiterator methods apply to all stored iterators, for example, {@link #previous} and {@link #hasPrevious}. Other list iterator methods are always supports for lists, but for other types of collections are only supported under certain conditions. For example, {@link #nextIndex} and {@link #previousIndex} are only supported when record number keys are used, while{@link #add} and {@link #set} are supported only under certain otherconditions. See the individual method descriptions for more information.
In addition, this class provides the following methods for stored collection iterators only. Note that the use of these methods is not compatible with the standard Java collections interface.
|
|
|
|
|
|