- All Implemented Interfaces:
- Supplier<Optional<T>>
public class IteratingSupplier<T>
extends Object
implements Supplier<Optional<T>>
Adapts an Iterator<T> to a Supplier<Optional<T>>. This is a
stateful supplier yielding Just elements of the source iterator, and Nothing
when the iterator is consumed.
- Author:
- rferranti