org.apache.sysds.runtime.instructions.spark.data

## Class LazyIterableIterator<T>

- java.lang.Object
- - org.apache.sysds.runtime.instructions.spark.data.LazyIterableIterator<T>

All Implemented Interfaces:
  Iterable<T>, Iterator<T>

    public abstract class LazyIterableIterator<T>
    extends Object
    implements Iterable<T>, Iterator<T>

This class is a generic base class for lazy, single pass iterator classes in order to simplify the implementation of lazy iterators for mapPartitions use cases. Note [SPARK-3369], which gives the reasons for backwards compatibility with regard to the iterable API despite Spark's single pass nature.

### Constructor Summary

Constructors
Constructor and Description
`LazyIterableIterator(Iterator<T> in)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `hasNext()`
`Iterator<T>` `iterator()`
`T` `next()`
`void` `remove()`

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

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

### Methods inherited from interface java.lang.Iterable

`forEach, spliterator`

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

`forEachRemaining`

### Constructor Detail

#### LazyIterableIterator

    public LazyIterableIterator(Iterator<T> in)

### Method Detail

#### iterator

    public Iterator<T> iterator()

Specified by:
  `iterator` in interface `Iterable<T>`

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<T>`

#### next

    public T next()

Specified by:
  `next` in interface `Iterator<T>`

#### remove

    public void remove()

Specified by:
  `remove` in interface `Iterator<T>`