MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / range

Method range

src/main/java/io/reactivex/rxjava3/core/Flowable.java:4416–4434  ·  view source on GitHub ↗

Returns a Flowable that emits a sequence of Integers within a specified range. Backpressure: The operator honors backpressure from

(int start, int count)

Source from the content-addressed store, hash-verified

4414 * @see #intervalRange(long, long, long, long, TimeUnit)
4415 */
4416 @CheckReturnValue
4417 @BackpressureSupport(BackpressureKind.FULL)
4418 @SchedulerSupport(SchedulerSupport.NONE)
4419 @NonNull
4420 public static Flowable<Integer> range(int start, int count) {
4421 if (count < 0) {
4422 throw new IllegalArgumentException("count >= 0 required but it was " + count);
4423 } else
4424 if (count == 0) {
4425 return empty();
4426 } else
4427 if (count == 1) {
4428 return just(start);
4429 } else
4430 if ((long)start + (count - 1) > Integer.MAX_VALUE) {
4431 throw new IllegalArgumentException("Integer overflow");
4432 }
4433 return RxJavaPlugins.onAssembly(new FlowableRange(start, count));
4434 }
4435
4436 /**
4437 * Returns a {@code Flowable} that emits a sequence of {@link Long}s within a specified range.

Callers 15

setupMethod · 0.95
setupMethod · 0.95
applyMethod · 0.95
setupMethod · 0.95
applyMethod · 0.95
flatMapTwoNestedSyncMethod · 0.95
applyMethod · 0.95
setupMethod · 0.95
setupMethod · 0.95
applyMethod · 0.95

Calls 3

emptyMethod · 0.95
justMethod · 0.95
onAssemblyMethod · 0.95

Tested by 15

syncQueueThrowsMethod · 0.76
requestMoreMethod · 0.76
awaitCountMethod · 0.76
awaitCountLessMethod · 0.76
fromFlowableManyMethod · 0.76
applyMethod · 0.76
syncRangeMethod · 0.76
syncRangeHiddenMethod · 0.76
rangeWithSchedulerMethod · 0.76
toObservableRangeMethod · 0.76