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>`

Enclosing class:
  LazyBag<E>

    public class LazyBag.BagIntersectionIterator
    extends LazyCollection.CachingIterator

`LazyCollection.ReadOnlyIterator` that 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
`BagIntersectionIterator​(LazyCollection<E> s)` Creates a new `LazyBag.BagIntersectionIterator` on this and `s`.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `hasNext()`
`E` `next()`

### 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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

### Constructor Detail

#### BagIntersectionIterator

    public BagIntersectionIterator​(LazyCollection<E> s)

Creates a new `LazyBag.BagIntersectionIterator` on this and `s`.

Parameters:
  `s` - the collection to intersect with this

### Method Detail

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `java.util.Iterator<E>`
Overrides:
  `hasNext` in class `LazyCollection.CachingIterator`

#### next

    public E next()

Specified by:
  `next` in interface `java.util.Iterator<E>`
Overrides:
  `next` in class `LazyCollection.CachingIterator`