rcf.core.util.iterator
Interface Iterator<T>
- Type Parameters:
T - The type of the elements which are stored at positions.
- All Superinterfaces:
- rcf.core.util.Copyable, ImmutableIterator<T>, ImmutablePosition<T>, ImmutableSingletonInterface<T>, Position<T>, SingletonInterface<T>
- All Known Implementing Classes:
- Pair.Iterator, Singleton.Iterator, Triple.Iterator
@Revision(value="$Revision: 1.4 $",
date="$Date: 2006/11/09 02:10:05 $",
tag="$Name: $")
public interface Iterator<T>- extends ImmutableIterator<T>, Position<T>
TODO: Javadoc
A combination of the ImmutableIterator and Position interfaces
which supports iteration over an Iterable. Please see
rcf.core.util.iterator for a discussion of the fact that this interface
contains no methods for navigating between positions.
TODO: Javadoc review, Seal/Finalize
- Version:
- $Revision: 1.4 $
- Author:
- Greg Gibeling
|
Method Summary |
Iterator<T> |
copy()
TODO: Javadoc
Return a new iterator which is currently at the same position as
this iterator. |
copy
Iterator<T> copy()
- Description copied from interface:
ImmutableIterator
- TODO: Javadoc
Return a new iterator which is currently at the same position as
this iterator. That is, this method will return an iterator
i such that this.equals(i) && this.isCompatible(i)
(notice that equals is symmetric but isCompatible is not). Note that a call to
e.g. ImmutableFixedUniIterator.next(rcf.core.util.filter.Filter)
on this must not affect i and vice-versa.
This method is extremely useful in conjunction with position based
collections where iteration is expensive or positions have algorithmic
importance or higher level semantics.
- Specified by:
copy in interface rcf.core.util.Copyable- Specified by:
copy in interface ImmutableIterator<T>
- Returns:
- A new iterator
i such that
this.equals(i).