Package org.eclipse.m2m.atl.emftvm.util
Class LazyCollection.CachingIterator
java.lang.Object
org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<E>
org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
- All Implemented Interfaces:
Iterator<E>
- Direct Known Subclasses:
EnumConversionList.EnumConversionIterator,EnumConversionSetOnSet.EnumConversionIterator,LazyBag.BagIntersectionIterator,LazyCollection.CachingSetIterator,LazyCollection.ExcludingIterator,LazyCollection.FilterIterator,LazyCollection.IntersectionIterator,LazyCollection.IteratorToListIterator,LazyCollection.SubtractionIterator,ModelImpl.InstanceOfList.InstanceOfIterator,OCLOperations.ResolveList.ResolveIterator
- Enclosing class:
- LazyCollection<E>
LazyCollection.ReadOnlyIterator that caches values of the underlying collection.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCachingIterator(Iterator<E> inner) Creates a newLazyCollection<E>.CachingIteratoraroundinner. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()next()protected final voidupdateCache(E next) Updates the cache withnext.Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
inner
-
i
protected int i
-
-
Constructor Details
-
CachingIterator
Creates a newLazyCollection<E>.CachingIteratoraroundinner.- Parameters:
inner- the underlying collection iterator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
updateCache
Updates the cache withnext.- Parameters:
next- the next element returned by this iterator
-