본문
180103(수) - RxJava2 (range)
Mobile/RxJava2 2018. 1. 3. 10:18
RxJava2
range
range
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static Flowable<java.lang.Integer> range(int start, int count)
Returns a Flowable that emits a sequence of Integers within a specified range.
- Backpressure:
- The operator honors backpressure from downstream and signals values on-demand (i.e., when requested).
- Scheduler:
range
does not operate by default on a particularScheduler
.
- Parameters:
start
- the value of the first Integer in the sequencecount
- the number of sequential Integers to generate- Returns:
- a Flowable that emits a range of sequential Integers
- Throws:
java.lang.IllegalArgumentException
- ifcount
is less than zero, or ifstart
+count
− 1 exceedsInteger.MAX_VALUE
- See Also:
- ReactiveX operators documentation: Range
rangeLong
@CheckReturnValue @BackpressureSupport(value=FULL) @SchedulerSupport(value="none") public static Flowable<java.lang.Long> rangeLong(long start, long count)
Returns a Flowable that emits a sequence of Longs within a specified range.
- Backpressure:
- The operator honors backpressure from downstream and signals values on-demand (i.e., when requested).
- Scheduler:
rangeLong
does not operate by default on a particularScheduler
.
- Parameters:
start
- the value of the first Long in the sequencecount
- the number of sequential Longs to generate- Returns:
- a Flowable that emits a range of sequential Longs
- Throws:
java.lang.IllegalArgumentException
- ifcount
is less than zero, or ifstart
+count
− 1 exceedsLong.MAX_VALUE
- See Also:
- ReactiveX operators documentation: Range
intervalRange
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="io.reactivex:computation") public static Flowable<java.lang.Long> intervalRange(long start, long count, long initialDelay, long period, java.util.concurrent.TimeUnit unit)
Signals a range of long values, the first after some initial delay and the rest periodically after.
The sequence completes immediately after the last value (start + count - 1) has been reached.
- Backpressure:
- The operator signals a
MissingBackpressureException
if the downstream can't keep up. - Scheduler:
intervalRange
by default operates on thecomputation
Scheduler
.
- Parameters:
start
- that start value of the rangecount
- the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.initialDelay
- the initial delay before signalling the first value (the start)period
- the period between subsequent valuesunit
- the unit of measure of the initialDelay and period amounts- Returns:
- the new Flowable instance
intervalRange
@CheckReturnValue @BackpressureSupport(value=ERROR) @SchedulerSupport(value="custom") public static Flowable<java.lang.Long> intervalRange(long start, long count, long initialDelay, long period, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
Signals a range of long values, the first after some initial delay and the rest periodically after.
The sequence completes immediately after the last value (start + count - 1) has been reached.
- Backpressure:
- The operator signals a
MissingBackpressureException
if the downstream can't keep up. - Scheduler:
- you provide the
Scheduler
.
- Parameters:
start
- that start value of the rangecount
- the number of values to emit in total, if zero, the operator emits an onComplete after the initial delay.initialDelay
- the initial delay before signalling the first value (the start)period
- the period between subsequent valuesunit
- the unit of measure of the initialDelay and period amountsscheduler
- the target scheduler where the values and terminal signals will be emitted- Returns:
- the new Flowable instance
'Mobile > RxJava2' 카테고리의 다른 글
180205(월) - RxJava2 (start) (0) | 2018.02.05 |
---|---|
180104(목) - RxJava2 (repeat) (0) | 2018.01.04 |
180102(화) - RxJava2 (Just) (0) | 2018.01.02 |
171225(월) - RxJava2 (interval) (0) | 2017.12.26 |
RxJava2 (from) (0) | 2017.12.18 |
댓글