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 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()