Package org.eclipse.m2m.atl.emftvm.util

# Class LazyCollection.UnionIterator

java.lang.Object
org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<E>
LazyCollection<E>.org.eclipse.m2m.atl.emftvm.util.LazyCollection.WrappedIterator
org.eclipse.m2m.atl.emftvm.util.LazyCollection.UnionIterator

All Implemented Interfaces:
  `Iterator<E>`

Enclosing class:
  `LazyCollection<E>`

public class LazyCollection.UnionIterator extends LazyCollection<E>.WrappedIterator
`Iterator` that returns first the elements of the underlying collection, then the elements of the other collection.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected Iterator<? extends E>`
`added`
`protected boolean`
`innerNext`
`protected final Iterable<? extends E>`
`s`

### Fields inherited from class org.eclipse.m2m.atl.emftvm.util.LazyCollection.WrappedIterator

`inner`

## Constructor Summary

Constructors
Constructor
Description
`UnionIterator(Iterable<? extends E> s)`
Creates a new `LazyCollection<E>.UnionIterator` for the underlying collection and `s`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`hasNext()`
`E`
`next()`

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

## Field Details

### s

protected final Iterable<? extends E> s

### added

protected Iterator<? extends E> added

### innerNext

protected boolean innerNext

## Constructor Details

### UnionIterator

public UnionIterator(Iterable<? extends E> s)
Creates a new `LazyCollection<E>.UnionIterator` for the underlying collection and `s`.

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

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<E>`
Overrides:
  `hasNext` in class `LazyCollection<E>.WrappedIterator`

### next

public E next()

Specified by:
  `next` in interface `Iterator<E>`
Overrides:
  `next` in class `LazyCollection<E>.WrappedIterator`