3232 * Extension of {@link Observable} that provides blocking operators.
3333 * <p>
3434 * Constructud via {@link #from(Observable)} or {@link Observable#toBlockingObservable()}
35+ * <p>
36+ * The documentation for this interface makes use of a form of marble diagram that has been
37+ * modified to illustrate blocking operators. The following legend explains marble diagrams:
38+ * <p>
39+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/legend.png">
40+ * <p>
41+ * For more information see the <a href="https://github.com/Netflix/RxJava/wiki/Observable">RxJava Wiki</a>
3542 *
3643 * @param <T>
3744 */
@@ -49,6 +56,8 @@ public Subscription call(Observer<T> observer) {
4956
5057 /**
5158 * Returns an iterator that iterates all values of the observable.
59+ * <p>
60+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.toIterator.png">
5261 *
5362 * @param source
5463 * an observable sequence to get an iterator for.
@@ -62,6 +71,8 @@ public static <T> Iterator<T> toIterator(Observable<T> source) {
6271
6372 /**
6473 * Returns the last element of an observable sequence with a specified source.
74+ * <p>
75+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.last.png">
6576 *
6677 * @param source
6778 * the source Observable
@@ -156,6 +167,8 @@ public Boolean call(T args) {
156167
157168 /**
158169 * Samples the most recent value in an observable sequence.
170+ * <p>
171+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.mostRecent.png">
159172 *
160173 * @param source
161174 * the source observable sequence.
@@ -171,6 +184,8 @@ public static <T> Iterable<T> mostRecent(Observable<T> source, T initialValue) {
171184
172185 /**
173186 * Samples the next value (blocking without buffering) from in an observable sequence.
187+ * <p>
188+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.next.png">
174189 *
175190 * @param items
176191 * the source observable sequence.
@@ -203,6 +218,8 @@ private static <T> T _singleOrDefault(BlockingObservable<T> source, boolean hasD
203218
204219 /**
205220 * Returns the only element of an observable sequence and throws an exception if there is not exactly one element in the observable sequence.
221+ * <p>
222+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.single.png">
206223 *
207224 * @param source
208225 * the source Observable
@@ -302,6 +319,8 @@ public static <T> Future<T> toFuture(final Observable<T> source) {
302319
303320 /**
304321 * Converts an observable sequence to an Iterable.
322+ * <p>
323+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.toIterable.png">
305324 *
306325 * @param source
307326 * the source Observable
@@ -331,6 +350,8 @@ private Subscription protectivelyWrapAndSubscribe(Observer<T> o) {
331350 * NOTE: This will block even if the Observable is asynchronous.
332351 * <p>
333352 * This is similar to {@link #subscribe(Observer)} but blocks. Because it blocks it does not need the {@link Observer#onCompleted()} or {@link Observer#onError(Exception)} methods.
353+ * <p>
354+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.forEach.png">
334355 *
335356 * @param onNext
336357 * {@link Action1}
@@ -395,6 +416,8 @@ public void onNext(T args) {
395416 * NOTE: This will block even if the Observable is asynchronous.
396417 * <p>
397418 * This is similar to {@link #subscribe(Observer)} but blocks. Because it blocks it does not need the {@link Observer#onCompleted()} or {@link Observer#onError(Exception)} methods.
419+ * <p>
420+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.forEach.png">
398421 *
399422 * @param o
400423 * onNext {@link Action1 action}
@@ -426,6 +449,8 @@ public void call(Object args) {
426449
427450 /**
428451 * Returns an iterator that iterates all values of the observable.
452+ * <p>
453+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.getIterator.png">
429454 *
430455 * @return the iterator that could be used to iterate over the elements of the observable.
431456 */
@@ -435,6 +460,8 @@ public Iterator<T> getIterator() {
435460
436461 /**
437462 * Returns the last element of an observable sequence with a specified source.
463+ * <p>
464+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.last.png">
438465 *
439466 * @return the last element in the observable sequence.
440467 */
@@ -527,6 +554,8 @@ public T lastOrDefault(T defaultValue, Object predicate) {
527554
528555 /**
529556 * Samples the most recent value in an observable sequence.
557+ * <p>
558+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.mostRecent.png">
530559 *
531560 * @param initialValue
532561 * the initial value that will be yielded by the enumerable sequence if no element has been sampled yet.
@@ -538,6 +567,8 @@ public Iterable<T> mostRecent(T initialValue) {
538567
539568 /**
540569 * Samples the next value (blocking without buffering) from in an observable sequence.
570+ * <p>
571+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.next.png">
541572 *
542573 * @return iterable that blocks upon each iteration until the next element in the observable source sequence becomes available.
543574 */
@@ -547,6 +578,8 @@ public Iterable<T> next() {
547578
548579 /**
549580 * Returns the only element of an observable sequence and throws an exception if there is not exactly one element in the observable sequence.
581+ * <p>
582+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.single.png">
550583 *
551584 * @return The single element in the observable sequence.
552585 */
@@ -642,6 +675,8 @@ public Future<T> toFuture() {
642675
643676 /**
644677 * Converts an observable sequence to an Iterable.
678+ * <p>
679+ * <img width="640" src="https://github.com/Netflix/RxJava/wiki/images/rx-operators/B.toIterable.png">
645680 *
646681 * @return Observable converted to Iterable.
647682 */
0 commit comments