Skip to content

Commit 9f12435

Browse files
committed
adding marble diagrams, see-also links to javadocs of new repeat() variants
1 parent d93dc37 commit 9f12435

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5550,12 +5550,16 @@ public final Observable<T> repeat(Scheduler scheduler) {
55505550
/**
55515551
* Returns an Observable that repeats the sequence of items emitted by the source
55525552
* Observable at most count times.
5553+
* <p>
5554+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/repeat.n.png">
55535555
*
55545556
* @param count
55555557
* the number of times the source Observable items are repeated,
5556-
* a count of 0 will yield an empty sequence.
5558+
* a count of 0 will yield an empty sequence
55575559
* @return an Observable that repeats the sequence of items emitted by the source
5558-
* Observable at most count times.
5560+
* Observable at most {@code count} times
5561+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Creating-Observables#wiki-repeat">RxJava Wiki: repeat()</a>
5562+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229428.aspx">MSDN: Observable.Repeat</a>
55595563
*/
55605564
public final Observable<T> repeat(long count) {
55615565
if (count < 0) {
@@ -5567,14 +5571,18 @@ public final Observable<T> repeat(long count) {
55675571
/**
55685572
* Returns an Observable that repeats the sequence of items emitted by the source
55695573
* Observable at most count times on a particular scheduler.
5574+
* <p>
5575+
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/repeat.ns.png">
55705576
*
55715577
* @param count
55725578
* the number of times the source Observable items are repeated,
55735579
* a count of 0 will yield an empty sequence.
55745580
* @param scheduler
5575-
* the scheduler to emit the items on
5581+
* the {@link Scheduler} to emit the items on
55765582
* @return an Observable that repeats the sequence of items emitted by the source
5577-
* Observable at most count times on a particular scheduler.
5583+
* Observable at most {@code count} times on a particular Scheduler
5584+
* @see <a href="https://github.com/Netflix/RxJava/wiki/Creating-Observables#wiki-repeat">RxJava Wiki: repeat()</a>
5585+
* @see <a href="http://msdn.microsoft.com/en-us/library/hh229428.aspx">MSDN: Observable.Repeat</a>
55785586
*/
55795587
public final Observable<T> repeat(long count, Scheduler scheduler) {
55805588
return nest().lift(new OperatorRepeat<T>(count, scheduler));

0 commit comments

Comments
 (0)