public final class IterableStream<T> extends Object
Iterable
values one by one and then complete.
Since the stream retains the iterable in a final field, any Subscriber
will replay all the iterable. This is a "Cold" stream.
Create such stream with the provided factory, E.g.:
Streams.just(1,2,3,4).consume(
log::info,
log::error,
(-> log.info("complete"))
)
//Will log: 1 2 3 4 complete
Constructor and Description |
---|
IterableStream() |
Modifier and Type | Method and Description |
---|---|
static <T> Stream<T> |
create(Iterable<? extends T> defaultValues)
Create an Iterable Stream Publisher
|
Copyright © 2017. All rights reserved.