Package org.eclipse.m2m.atl.emftvm.util
Class LazyBag.BagIntersectionIterator
- java.lang.Object
-
- org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<E>
-
- org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
-
- org.eclipse.m2m.atl.emftvm.util.LazyBag.BagIntersectionIterator
-
- All Implemented Interfaces:
java.util.Iterator<E>
public class LazyBag.BagIntersectionIterator extends LazyCollection.CachingIterator
LazyCollection.ReadOnlyIteratorthat returns only elements contained in both underlying collections, where the element occurs as often as in the collection with the least occurrences of the element.
-
-
Field Summary
-
Fields inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
i, inner
-
-
Constructor Summary
Constructors Constructor Description BagIntersectionIterator(LazyCollection<E> s)Creates a newLazyBag.BagIntersectionIteratoron this ands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Enext()-
Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.CachingIterator
updateCache
-
Methods inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator
remove
-
-
-
-
Constructor Detail
-
BagIntersectionIterator
public BagIntersectionIterator(LazyCollection<E> s)
Creates a newLazyBag.BagIntersectionIteratoron this ands.- Parameters:
s- the collection to intersect with this
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<E>- Overrides:
hasNextin classLazyCollection.CachingIterator
-
next
public E next()
- Specified by:
nextin interfacejava.util.Iterator<E>- Overrides:
nextin classLazyCollection.CachingIterator
-
-