@@ -4412,49 +4412,77 @@ public static Observable<Double> sumDoubles(Observable<Double> source) {
4412
4412
return OperationSum .sumDoubles (source );
4413
4413
}
4414
4414
4415
- /**
4416
- * Create an Observable that extracts integer values from this Observable via
4417
- * the provided function and computes the integer sum of the value sequence.
4415
+ /**
4416
+ * Create an Observable that extracts an integer from each of the items
4417
+ * emitted by the source Observable via a function you specify, and then
4418
+ * emits the sum of these integers.
4419
+ * <p>
4420
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/sum.f.png">
4418
4421
*
4419
- * @param valueExtractor the function to extract an integer from this Observable
4420
- * @return an Observable that extracts integer values from this Observable via
4421
- * the provided function and computes the integer sum of the value sequence.
4422
+ * @param valueExtractor the function to extract an integer from each item
4423
+ * emitted by the source Observable
4424
+ * @return an Observable that emits the integer sum of the integer values
4425
+ * corresponding to the items emitted by the source Observable
4426
+ * transformed by the provided function
4427
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#sum">RxJava Wiki: sumInteger()</a>
4428
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sum.aspx">MSDN: Observable.Sum</a>
4422
4429
*/
4423
4430
public Observable <Integer > sumInteger (Func1 <? super T , Integer > valueExtractor ) {
4424
4431
return create (new OperationSum .SumIntegerExtractor <T >(this , valueExtractor ));
4425
4432
}
4426
4433
4427
4434
/**
4428
- * Create an Observable that extracts long values from this Observable via
4429
- * the provided function and computes the long sum of the value sequence.
4435
+ * Create an Observable that extracts a long from each of the items emitted
4436
+ * by the source Observable via a function you specify, and then emits the
4437
+ * sum of these longs.
4438
+ * <p>
4439
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/sum.f.png">
4430
4440
*
4431
- * @param valueExtractor the function to extract an long from this Observable
4432
- * @return an Observable that extracts long values from this Observable via
4433
- * the provided function and computes the long sum of the value sequence.
4441
+ * @param valueExtractor the function to extract a long from each item
4442
+ * emitted by the source Observable
4443
+ * @return an Observable that emits the long sum of the integer values
4444
+ * corresponding to the items emitted by the source Observable
4445
+ * transformed by the provided function
4446
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#sum">RxJava Wiki: sumLong()</a>
4447
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sum.aspx">MSDN: Observable.Sum</a>
4434
4448
*/
4435
4449
public Observable <Long > sumLong (Func1 <? super T , Long > valueExtractor ) {
4436
4450
return create (new OperationSum .SumLongExtractor <T >(this , valueExtractor ));
4437
4451
}
4438
4452
4439
4453
/**
4440
- * Create an Observable that extracts float values from this Observable via
4441
- * the provided function and computes the float sum of the value sequence.
4454
+ * Create an Observable that extracts a float from each of the items emitted
4455
+ * by the source Observable via a function you specify, and then emits the
4456
+ * sum of these floats.
4457
+ * <p>
4458
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/sum.f.png">
4442
4459
*
4443
- * @param valueExtractor the function to extract an float from this Observable
4444
- * @return an Observable that extracts float values from this Observable via
4445
- * the provided function and computes the float sum of the value sequence.
4460
+ * @param valueExtractor the function to extract a float from each item
4461
+ * emitted by the source Observable
4462
+ * @return an Observable that emits the float sum of the integer values
4463
+ * corresponding to the items emitted by the source Observable
4464
+ * transformed by the provided function
4465
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#sum">RxJava Wiki: sumFloat()</a>
4466
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sum.aspx">MSDN: Observable.Sum</a>
4446
4467
*/
4447
4468
public Observable <Float > sumFloat (Func1 <? super T , Float > valueExtractor ) {
4448
4469
return create (new OperationSum .SumFloatExtractor <T >(this , valueExtractor ));
4449
4470
}
4450
4471
4451
4472
/**
4452
- * Create an Observable that extracts double values from this Observable via
4453
- * the provided function and computes the double sum of the value sequence.
4473
+ * Create an Observable that extracts a double from each of the items
4474
+ * emitted by the source Observable via a function you specify, and then
4475
+ * emits the sum of these doubles.
4476
+ * <p>
4477
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/sum.f.png">
4454
4478
*
4455
- * @param valueExtractor the function to extract an double from this Observable
4456
- * @return an Observable that extracts double values from this Observable via
4457
- * the provided function and computes the double sum of the value sequence.
4479
+ * @param valueExtractor the function to extract a double from each item
4480
+ * emitted by the source Observable
4481
+ * @return an Observable that emits the double sum of the integer values
4482
+ * corresponding to the items emitted by the source Observable
4483
+ * transformed by the provided function
4484
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#sum">RxJava Wiki: sumDouble()</a>
4485
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.sum.aspx">MSDN: Observable.Sum</a>
4458
4486
*/
4459
4487
public Observable <Double > sumDouble (Func1 <? super T , Double > valueExtractor ) {
4460
4488
return create (new OperationSum .SumDoubleExtractor <T >(this , valueExtractor ));
@@ -4526,48 +4554,76 @@ public static Observable<Double> averageDoubles(Observable<Double> source) {
4526
4554
}
4527
4555
4528
4556
/**
4529
- * Create an Observable that extracts integer values from this Observable via
4530
- * the provided function and computes the integer average of the value sequence.
4557
+ * Create an Observable that transforms items emitted by the source
4558
+ * Observable into integers by using a function you provide and then emits
4559
+ * the integer average of the complete sequence of transformed values.
4560
+ * <p>
4561
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/average.f.png">
4531
4562
*
4532
- * @param valueExtractor the function to extract an integer from this Observable
4533
- * @return an Observable that extracts integer values from this Observable via
4534
- * the provided function and computes the integer average of the value sequence.
4563
+ * @param valueExtractor the function to transform an item emitted by the
4564
+ * source Observable into an integer
4565
+ * @return an Observable that emits the integer average of the complete
4566
+ * sequence of items emitted by the source Observable when
4567
+ * transformed into integers by the specified function
4568
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#average">RxJava Wiki: averageInteger()</a>
4569
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.average.aspx">MSDN: Observable.Average</a>
4535
4570
*/
4536
4571
public Observable <Integer > averageInteger (Func1 <? super T , Integer > valueExtractor ) {
4537
4572
return create (new OperationAverage .AverageIntegerExtractor <T >(this , valueExtractor ));
4538
4573
}
4539
4574
4540
4575
/**
4541
- * Create an Observable that extracts long values from this Observable via
4542
- * the provided function and computes the long average of the value sequence.
4576
+ * Create an Observable that transforms items emitted by the source
4577
+ * Observable into longs by using a function you provide and then emits
4578
+ * the long average of the complete sequence of transformed values.
4579
+ * <p>
4580
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/average.f.png">
4543
4581
*
4544
- * @param valueExtractor the function to extract an long from this Observable
4545
- * @return an Observable that extracts long values from this Observable via
4546
- * the provided function and computes the long average of the value sequence.
4582
+ * @param valueExtractor the function to transform an item emitted by the
4583
+ * source Observable into a long
4584
+ * @return an Observable that emits the long average of the complete
4585
+ * sequence of items emitted by the source Observable when
4586
+ * transformed into longs by the specified function
4587
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#average">RxJava Wiki: averageLong()</a>
4588
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.average.aspx">MSDN: Observable.Average</a>
4547
4589
*/
4548
4590
public Observable <Long > averageLong (Func1 <? super T , Long > valueExtractor ) {
4549
4591
return create (new OperationAverage .AverageLongExtractor <T >(this , valueExtractor ));
4550
4592
}
4551
4593
4552
4594
/**
4553
- * Create an Observable that extracts float values from this Observable via
4554
- * the provided function and computes the float average of the value sequence.
4595
+ * Create an Observable that transforms items emitted by the source
4596
+ * Observable into floats by using a function you provide and then emits
4597
+ * the float average of the complete sequence of transformed values.
4598
+ * <p>
4599
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/average.f.png">
4555
4600
*
4556
- * @param valueExtractor the function to extract an float from this Observable
4557
- * @return an Observable that extracts float values from this Observable via
4558
- * the provided function and computes the float average of the value sequence.
4601
+ * @param valueExtractor the function to transform an item emitted by the
4602
+ * source Observable into a float
4603
+ * @return an Observable that emits the float average of the complete
4604
+ * sequence of items emitted by the source Observable when
4605
+ * transformed into floats by the specified function
4606
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#average">RxJava Wiki: averageFloat()</a>
4607
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.average.aspx">MSDN: Observable.Average</a>
4559
4608
*/
4560
4609
public Observable <Float > averageFloat (Func1 <? super T , Float > valueExtractor ) {
4561
4610
return create (new OperationAverage .AverageFloatExtractor <T >(this , valueExtractor ));
4562
4611
}
4563
4612
4564
4613
/**
4565
- * Create an Observable that extracts double values from this Observable via
4566
- * the provided function and computes the double average of the value sequence.
4614
+ * Create an Observable that transforms items emitted by the source
4615
+ * Observable into doubles by using a function you provide and then emits
4616
+ * the double average of the complete sequence of transformed values.
4617
+ * <p>
4618
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/average.f.png">
4567
4619
*
4568
- * @param valueExtractor the function to extract an double from this Observable
4569
- * @return an Observable that extracts double values from this Observable via
4570
- * the provided function and computes the double average of the value sequence.
4620
+ * @param valueExtractor the function to transform an item emitted by the
4621
+ * source Observable into a double
4622
+ * @return an Observable that emits the double average of the complete
4623
+ * sequence of items emitted by the source Observable when
4624
+ * transformed into doubles by the specified function
4625
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Mathematical-and-Aggregate-Operators#average">RxJava Wiki: averageDouble()</a>
4626
+ * @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.linq.observable.average.aspx">MSDN: Observable.Average</a>
4571
4627
*/
4572
4628
public Observable <Double > averageDouble (Func1 <? super T , Double > valueExtractor ) {
4573
4629
return create (new OperationAverage .AverageDoubleExtractor <T >(this , valueExtractor ));
0 commit comments