public interface Streamable<T> extends Iterable<T>
Iterables.| Modifier and Type | Method and Description |
|---|---|
static <T> Streamable<T> |
empty()
Returns an empty
Streamable. |
static <T> Streamable<T> |
of(Iterable<T> iterable)
Returns a
Streamable for the given Iterable. |
static <T> Streamable<T> |
ofLazy(Supplier<Stream<T>> supplier)
|
default Stream<T> |
stream()
|
forEach, iterator, spliteratorstatic <T> Streamable<T> of(Iterable<T> iterable)
Streamable for the given Iterable.iterable - must not be null.static <T> Streamable<T> ofLazy(Supplier<Stream<T>> supplier)
Streamable from the given Supplier that can produce a Stream in the first
place. The given Supplier will only be accessed once the created Streamable is actually used, i.e.
stream() is called.supplier - must not be null.static <T> Streamable<T> empty()
Streamable.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.