- All Superinterfaces:
- Iterator<E>
- All Known Subinterfaces:
- UnmodListIterator<E>, UnmodSortedIterator<E>
- All Known Implementing Classes:
- FunctionUtils.UnmodifiableIterator, FunctionUtils.UnmodifiableListIterator, FunctionUtils.UnmodifiableSortedIterator, UnmodIterator.Wrapper, UnmodMap.UnEntry.EntryToUnEntryIter, UnmodMap.UnEntry.EntryToUnEntrySortedIter, UnmodMap.UnEntry.UnmodKeyIter, UnmodMap.UnEntry.UnmodSortedKeyIter, UnmodMap.UnEntry.UnmodSortedValIter, UnmodMap.UnEntry.UnmodValIter, UnmodSortedIterator.Wrapper
public interface UnmodIterator<E>
extends Iterator<E>
A one-time use, mutable, not-thread-safe way to get each value of the underling collection in
turn. I experimented with various thread-safe alternatives, but the JVM is optimized around
iterators so this is the lowest common denominator of collection iteration, even though
iterators are inherently mutable.
This is called "Unmod" in the sense that it doesn't modify the underlying collection. Iterators
are inherently mutable. The only safe way to handle them is to pass around IteraBLEs so that
the ultimate client gets its own, unshared iteraTOR. Order is not guaranteed.