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

Method range

src/main/java/io/reactivex/rxjava3/core/Observable.java:3926–3943  ·  view source on GitHub ↗

Returns an Observable that emits a sequence of Integers within a specified range. Scheduler: range does not operate by defa

(int start, int count)

Source from the content-addressed store, hash-verified

3924 * @see #intervalRange(long, long, long, long, TimeUnit)
3925 */
3926 @CheckReturnValue
3927 @SchedulerSupport(SchedulerSupport.NONE)
3928 @NonNull
3929 public static Observable<Integer> range(int start, int count) {
3930 if (count < 0) {
3931 throw new IllegalArgumentException("count >= 0 required but it was " + count);
3932 }
3933 if (count == 0) {
3934 return empty();
3935 }
3936 if (count == 1) {
3937 return just(start);
3938 }
3939 if ((long)start + (count - 1) > Integer.MAX_VALUE) {
3940 throw new IllegalArgumentException("Integer overflow");
3941 }
3942 return RxJavaPlugins.onAssembly(new ObservableRange(start, count));
3943 }
3944
3945 /**
3946 * Returns an {@code Observable} that emits a sequence of {@link Long}s within a specified range.

Callers 15

setupMethod · 0.95
applyMethod · 0.95
setupMethod · 0.95
applyMethod · 0.95
setupMethod · 0.95
applyMethod · 0.95
syncQueueThrowsMethod · 0.95
fromObservableManyMethod · 0.95
applyMethod · 0.95
withObservableMethod · 0.95
rangeMethod · 0.95
observeOnMethod · 0.95

Calls 3

emptyMethod · 0.95
justMethod · 0.95
onAssemblyMethod · 0.95

Tested by 15

syncQueueThrowsMethod · 0.76
fromObservableManyMethod · 0.76
applyMethod · 0.76
withObservableMethod · 0.76
rangeMethod · 0.76
observeOnMethod · 0.76
allMethod · 0.76
simpleMethod · 0.76
takeMethod · 0.76
simpleMethod · 0.76
simpleLongMethod · 0.76
takeMethod · 0.76