public final class RangeStream extends Object
Long from the inclusive start value defined to the inclusive end and then
complete.
Since the stream retains the boundaries in a final field, any Subscriber
will replay all the range. This is a "Cold" stream.
Create such stream with the provided factory, E.g.:
Streams.range(1, 10000).consume(
log::info,
log::error,
(-> log.info("complete"))
)
Will log:
1
2
3
4
complete
| Constructor and Description |
|---|
RangeStream() |
| Modifier and Type | Method and Description |
|---|---|
static Stream<Long> |
create(long min,
long max)
Create a Range Stream Publisher
|
Copyright © 2016. All rights reserved.