@@ -2010,24 +2010,24 @@ public static <T> Observable<T> takeLast(final Observable<T> items, final int co
2010
2010
}
2011
2011
2012
2012
/**
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 .
2014
2014
*
2015
2015
* @param items
2016
2016
* @param predicate
2017
2017
* a function to test each source element for a condition
2018
- * @return
2018
+ * @return the values from the start of the given sequence
2019
2019
*/
2020
2020
public static <T > Observable <T > takeWhile (final Observable <T > items , Func1 <T , Boolean > predicate ) {
2021
2021
return create (OperationTakeWhile .takeWhile (items , predicate ));
2022
2022
}
2023
2023
2024
2024
/**
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 .
2026
2026
*
2027
2027
* @param items
2028
2028
* @param predicate
2029
2029
* a function to test each source element for a condition
2030
- * @return
2030
+ * @return the values from the start of the given sequence
2031
2031
*/
2032
2032
public static <T > Observable <T > takeWhile (final Observable <T > items , Object predicate ) {
2033
2033
@ SuppressWarnings ("rawtypes" )
@@ -2047,7 +2047,7 @@ public Boolean call(T t) {
2047
2047
* @param items
2048
2048
* @param predicate
2049
2049
* 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
2051
2051
*/
2052
2052
public static <T > Observable <T > takeWhileWithIndex (final Observable <T > items , Func2 <T , Integer , Boolean > predicate ) {
2053
2053
return create (OperationTakeWhile .takeWhileWithIndex (items , predicate ));
@@ -2388,7 +2388,7 @@ public static <T> Observable<T> toObservable(T... items) {
2388
2388
* @param sequence
2389
2389
* @throws ClassCastException
2390
2390
* if T objects do not implement Comparable
2391
- * @return
2391
+ * @return an observable containing the sorted list
2392
2392
*/
2393
2393
public static <T > Observable <List <T >> toSortedList (Observable <T > sequence ) {
2394
2394
return create (OperationToObservableSortedList .toSortedList (sequence ));
@@ -2401,7 +2401,7 @@ public static <T> Observable<List<T>> toSortedList(Observable<T> sequence) {
2401
2401
*
2402
2402
* @param sequence
2403
2403
* @param sortFunction
2404
- * @return
2404
+ * @return an observable containing the sorted list
2405
2405
*/
2406
2406
public static <T > Observable <List <T >> toSortedList (Observable <T > sequence , Func2 <T , T , Integer > sortFunction ) {
2407
2407
return create (OperationToObservableSortedList .toSortedList (sequence , sortFunction ));
@@ -2414,7 +2414,7 @@ public static <T> Observable<List<T>> toSortedList(Observable<T> sequence, Func2
2414
2414
*
2415
2415
* @param sequence
2416
2416
* @param sortFunction
2417
- * @return
2417
+ * @return an observable containing the sorted list
2418
2418
*/
2419
2419
public static <T > Observable <List <T >> toSortedList (Observable <T > sequence , final Object sortFunction ) {
2420
2420
@ SuppressWarnings ("rawtypes" )
@@ -3421,18 +3421,18 @@ public Observable<T> take(final int num) {
3421
3421
*
3422
3422
* @param predicate
3423
3423
* a function to test each source element for a condition
3424
- * @return
3424
+ * @return the values from the start of the given sequence
3425
3425
*/
3426
3426
public Observable <T > takeWhile (final Func1 <T , Boolean > predicate ) {
3427
3427
return takeWhile (this , predicate );
3428
3428
}
3429
3429
3430
3430
/**
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 .
3432
3432
*
3433
3433
* @param predicate
3434
3434
* a function to test each source element for a condition
3435
- * @return
3435
+ * @return the values from the start of the given sequence
3436
3436
*/
3437
3437
public Observable <T > takeWhile (final Object predicate ) {
3438
3438
return takeWhile (this , predicate );
@@ -3443,7 +3443,7 @@ public Observable<T> takeWhile(final Object predicate) {
3443
3443
*
3444
3444
* @param predicate
3445
3445
* 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
3447
3447
*/
3448
3448
public Observable <T > takeWhileWithIndex (final Func2 <T , Integer , Boolean > predicate ) {
3449
3449
return takeWhileWithIndex (this , predicate );
@@ -3454,7 +3454,7 @@ public Observable<T> takeWhileWithIndex(final Func2<T, Integer, Boolean> predica
3454
3454
*
3455
3455
* @param predicate
3456
3456
* 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
3458
3458
*/
3459
3459
public Observable <T > takeWhileWithIndex (final Object predicate ) {
3460
3460
return takeWhileWithIndex (this , predicate );
@@ -3525,7 +3525,7 @@ public Observable<List<T>> toList() {
3525
3525
*
3526
3526
* @throws ClassCastException
3527
3527
* if T objects do not implement Comparable
3528
- * @return
3528
+ * @return an observable containing the sorted list
3529
3529
*/
3530
3530
public Observable <List <T >> toSortedList () {
3531
3531
return toSortedList (this );
@@ -3537,7 +3537,7 @@ public Observable<List<T>> toSortedList() {
3537
3537
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toSortedList.png">
3538
3538
*
3539
3539
* @param sortFunction
3540
- * @return
3540
+ * @return an observable containing the sorted list
3541
3541
*/
3542
3542
public Observable <List <T >> toSortedList (Func2 <T , T , Integer > sortFunction ) {
3543
3543
return toSortedList (this , sortFunction );
@@ -3549,7 +3549,7 @@ public Observable<List<T>> toSortedList(Func2<T, T, Integer> sortFunction) {
3549
3549
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/toSortedList.png">
3550
3550
*
3551
3551
* @param sortFunction
3552
- * @return
3552
+ * @return an observable containing the sorted list
3553
3553
*/
3554
3554
public Observable <List <T >> toSortedList (final Object sortFunction ) {
3555
3555
return toSortedList (this , sortFunction );
@@ -3636,7 +3636,7 @@ public Iterable<T> mostRecent(T initialValue) {
3636
3636
* 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.
3637
3637
*
3638
3638
* @param f
3639
- * @return
3639
+ * @return {@code true} if the given function is an internal implementation, and {@code false} otherwise.
3640
3640
*/
3641
3641
private boolean isInternalImplementation (Object o ) {
3642
3642
if (o == null ) {
0 commit comments