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

# Class LazyCollection.CollectIterator<T>

java.lang.Object
org.eclipse.m2m.atl.emftvm.util.LazyCollection.ReadOnlyIterator<T>
org.eclipse.m2m.atl.emftvm.util.LazyCollection.CollectIterator<T>

Type Parameters:
  `T` - the function return type

All Implemented Interfaces:
  `Iterator<T>`

Enclosing class:
  LazyCollection<E>

public static class LazyCollection.CollectIterator<T> extends LazyCollection.ReadOnlyIterator<T>
`LazyCollection.ReadOnlyIterator` that collects the results of evaluating a function on each of the elements from the underlying collection.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final CodeBlock`
`function`
`protected final Iterator<?>`
`inner`
`protected final StackFrame`
`parentFrame`

## Constructor Summary

Constructors
Constructor
Description
`CollectIterator(Iterable<?> inner, CodeBlock function, StackFrame parentFrame)`
Creates a `LazyCollection.CollectIterator` with `condition` on `inner`.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`hasNext()`
`T`
`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

### inner

protected final Iterator<?> inner

### function

protected final CodeBlock function

### parentFrame

protected final StackFrame parentFrame

## Constructor Details

### CollectIterator

public CollectIterator(Iterable<?> inner, CodeBlock function, StackFrame parentFrame)
Creates a `LazyCollection.CollectIterator` with `condition` on `inner`.

Parameters:
  `inner` - the underlying collection
  `function` - the value function
  `parentFrame` - the parent stack frame context

## Method Details

### hasNext

public boolean hasNext()

### next

public T next()