@@ -2010,24 +2010,24 @@ public static <T> Observable<T> takeLast(final Observable<T> items, final int co
20102010 }
20112011
20122012 /**
2013- * Returns a specified number of contiguous values from the start of an observable sequence.
2013+ * Returns the values from the start of an observable sequence while a given predicate remains true .
20142014 *
20152015 * @param items
20162016 * @param predicate
20172017 * a function to test each source element for a condition
2018- * @return
2018+ * @return the values from the start of the given sequence
20192019 */
20202020 public static <T > Observable <T > takeWhile (final Observable <T > items , Func1 <T , Boolean > predicate ) {
20212021 return create (OperationTakeWhile .takeWhile (items , predicate ));
20222022 }
20232023
20242024 /**
2025- * Returns a specified number of contiguous values from the start of an observable sequence.
2025+ * Returns the values from the start of an observable sequence while a given predicate remains true .
20262026 *
20272027 * @param items
20282028 * @param predicate
20292029 * a function to test each source element for a condition
2030- * @return
2030+ * @return the values from the start of the given sequence
20312031 */
20322032 public static <T > Observable <T > takeWhile (final Observable <T > items , Object predicate ) {
20332033 @ SuppressWarnings ("rawtypes" )
@@ -2047,7 +2047,7 @@ public Boolean call(T t) {
20472047 * @param items
20482048 * @param predicate
20492049 * a function to test each element for a condition; the second parameter of the function represents the index of the source element; otherwise, false.
2050- * @return
2050+ * @return the values from the start of the given sequence
20512051 */
20522052 public static <T > Observable <T > takeWhileWithIndex (final Observable <T > items , Func2 <T , Integer , Boolean > predicate ) {
20532053 return create (OperationTakeWhile .takeWhileWithIndex (items , predicate ));
@@ -2388,7 +2388,7 @@ public static <T> Observable<T> toObservable(T... items) {
23882388 * @param sequence
23892389 * @throws ClassCastException
23902390 * if T objects do not implement Comparable
2391- * @return
2391+ * @return an observable containing the sorted list
23922392 */
23932393 public static <T > Observable <List <T >> toSortedList (Observable <T > sequence ) {
23942394 return create (OperationToObservableSortedList .toSortedList (sequence ));
@@ -2401,7 +2401,7 @@ public static <T> Observable<List<T>> toSortedList(Observable<T> sequence) {
24012401 *
24022402 * @param sequence
24032403 * @param sortFunction
2404- * @return
2404+ * @return an observable containing the sorted list
24052405 */
24062406 public static <T > Observable <List <T >> toSortedList (Observable <T > sequence , Func2 <T , T , Integer > sortFunction ) {
24072407 return create (OperationToObservableSortedList .toSortedList (sequence , sortFunction ));
@@ -2414,7 +2414,7 @@ public static <T> Observable<List<T>> toSortedList(Observable<T> sequence, Func2
24142414 *
24152415 * @param sequence
24162416 * @param sortFunction
2417- * @return
2417+ * @return an observable containing the sorted list
24182418 */
24192419 public static <T > Observable <List <T >> toSortedList (Observable <T > sequence , final Object sortFunction ) {
24202420 @ SuppressWarnings ("rawtypes" )
@@ -3421,18 +3421,18 @@ public Observable<T> take(final int num) {
34213421 *
34223422 * @param predicate
34233423 * a function to test each source element for a condition
3424- * @return
3424+ * @return the values from the start of the given sequence
34253425 */
34263426 public Observable <T > takeWhile (final Func1 <T , Boolean > predicate ) {
34273427 return takeWhile (this , predicate );
34283428 }
34293429
34303430 /**
3431- * Returns a specified number of contiguous values from the start of an observable sequence .
3431+ * Returns an Observable that items emitted by the source Observable as long as a specified condition is true .
34323432 *
34333433 * @param predicate
34343434 * a function to test each source element for a condition
3435- * @return
3435+ * @return the values from the start of the given sequence
34363436 */
34373437 public Observable <T > takeWhile (final Object predicate ) {
34383438 return takeWhile (this , predicate );
@@ -3443,7 +3443,7 @@ public Observable<T> takeWhile(final Object predicate) {
34433443 *
34443444 * @param predicate
34453445 * a function to test each element for a condition; the second parameter of the function represents the index of the source element; otherwise, false.
3446- * @return
3446+ * @return the values from the start of the given sequence
34473447 */
34483448 public Observable <T > takeWhileWithIndex (final Func2 <T , Integer , Boolean > predicate ) {
34493449 return takeWhileWithIndex (this , predicate );
@@ -3454,7 +3454,7 @@ public Observable<T> takeWhileWithIndex(final Func2<T, Integer, Boolean> predica
34543454 *
34553455 * @param predicate
34563456 * a function to test each element for a condition; the second parameter of the function represents the index of the source element; otherwise, false.
3457- * @return
3457+ * @return the values from the start of the given sequence
34583458 */
34593459 public Observable <T > takeWhileWithIndex (final Object predicate ) {
34603460 return takeWhileWithIndex (this , predicate );
@@ -3525,7 +3525,7 @@ public Observable<List<T>> toList() {
35253525 *
35263526 * @throws ClassCastException
35273527 * if T objects do not implement Comparable
3528- * @return
3528+ * @return an observable containing the sorted list
35293529 */
35303530 public Observable <List <T >> toSortedList () {
35313531 return toSortedList (this );
@@ -3537,7 +3537,7 @@ public Observable<List<T>> toSortedList() {
35373537 * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toSortedList.png">
35383538 *
35393539 * @param sortFunction
3540- * @return
3540+ * @return an observable containing the sorted list
35413541 */
35423542 public Observable <List <T >> toSortedList (Func2 <T , T , Integer > sortFunction ) {
35433543 return toSortedList (this , sortFunction );
@@ -3549,7 +3549,7 @@ public Observable<List<T>> toSortedList(Func2<T, T, Integer> sortFunction) {
35493549 * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toSortedList.png">
35503550 *
35513551 * @param sortFunction
3552- * @return
3552+ * @return an observable containing the sorted list
35533553 */
35543554 public Observable <List <T >> toSortedList (final Object sortFunction ) {
35553555 return toSortedList (this , sortFunction );
@@ -3636,7 +3636,7 @@ public Iterable<T> mostRecent(T initialValue) {
36363636 * NOTE: If strong reasons for not depending on package names comes up then the implementation of this method can change to looking for a marker interface.
36373637 *
36383638 * @param f
3639- * @return
3639+ * @return {@code true} if the given function is an internal implementation, and {@code false} otherwise.
36403640 */
36413641 private boolean isInternalImplementation (Object o ) {
36423642 if (o == null ) {
0 commit comments