rcf.core.util.iterator
Interface ImmutableIterator<T>

Type Parameters:
T - The type of the elements which are stored at positions.
All Superinterfaces:
rcf.core.util.Copyable, ImmutablePosition<T>, ImmutableSingletonInterface<T>
All Known Subinterfaces:
Iterator<T>
All Known Implementing Classes:
ImmutablePair.Iterator, ImmutableSingleton.Iterator, ImmutableTriple.Iterator, Pair.Iterator, Singleton.Iterator, Triple.Iterator

@Revision(value="$Revision: 1.7 $",
          date="$Date: 2006/11/09 02:10:05 $",
          tag="$Name:  $")
public interface ImmutableIterator<T>
extends ImmutablePosition<T>, rcf.core.util.Copyable

TODO: Javadoc An extension of the ImmutablePosition interface, which adds support for forking this iterator. 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.7 $
Author:
Greg Gibeling

Method Summary
 ImmutableIterator<T> copy()
          TODO: Javadoc Return a new iterator which is currently at the same position as this iterator.
 ImmutableIterable<T> iterable()
          TODO: Javadoc
 
Methods inherited from interface rcf.core.util.position.ImmutablePosition
equals, isCompatible, isSentinel
 
Methods inherited from interface rcf.core.util.groups.ImmutableSingletonInterface
get
 

Method Detail

copy

ImmutableIterator<T> copy()
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
Returns:
A new iterator i such that this.equals(i).

iterable

ImmutableIterable<T> iterable()
TODO: Javadoc

Returns: