org.reactivestreams.Publisher<java.lang.Integer>
public final class RangePublisher extends java.lang.Object implements org.reactivestreams.Publisher<java.lang.Integer>
Publisher
that can
be subscribed to multiple times and each individual subscription
will receive range of monotonically increasing integer values on demand.Constructor | Description |
---|---|
RangePublisher(int start,
int count) |
Constructs a RangePublisher instance with the given start and count values
that yields a sequence of [start, start + count).
|
Modifier and Type | Method | Description |
---|---|---|
void |
subscribe(org.reactivestreams.Subscriber<? super java.lang.Integer> subscriber) |
public RangePublisher(int start, int count)
start
- the starting value of the rangecount
- the number of items to emitpublic void subscribe(org.reactivestreams.Subscriber<? super java.lang.Integer> subscriber)
subscribe
in interface org.reactivestreams.Publisher<java.lang.Integer>