-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.x: Update Mathematical and Aggregate Operators docs #6140
2.x: Update Mathematical and Aggregate Operators docs #6140
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #6140 +/- ##
============================================
+ Coverage 98.19% 98.27% +0.08%
Complexity 6195 6195
============================================
Files 667 667
Lines 44853 44853
Branches 6213 6213
============================================
+ Hits 44043 44081 +38
+ Misses 259 235 -24
+ Partials 551 537 -14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, but some small adjustments would be great. See comments below.
This page shows operators that perform mathematical or other operations over an entire sequence of items emitted by an `Observable`. Because these operations must wait for the source `Observable` to complete emitting items before they can construct their own emissions (and must usually buffer these items), these operators are dangerous to use on `Observable`s that may have very long or infinite sequences. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"or Flowable
"
|
||
> The operators in this section are part of the [`RxJava2Extensions`](https://github.com/akarnokd/RxJava2Extensions) project. You have to add the `rxjava2-extensions` module as a dependency to your project. It can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.github.akarnokd%22). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For clarity, you could include the import here:
import hu.akarnokd.rxjava2.math.MathObservable`;
import hu.akarnokd.rxjava2.math.MathFlowable`;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you can add the following additional note.
"Note that unlike the standard RxJava aggregator operators, these mathematical operators return Observable
and Flowable
instead of the Single
or Maybe
."
``` | ||
|
||
## Other Aggregate Operators |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Standard Aggregate Operators"
|
||
## Other Aggregate Operators | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note on the return type would be great here:
"Note that these standard aggregate operators return a Single
or Maybe
because the number of output items is always know to be at most one."
``` | ||
|
||
### toList and toSortedList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split these into their own section.
``` | ||
|
||
### collect and collectInto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split these into their own section.
``` | ||
|
||
### reduce and reduceWith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split these into their own section.
This PR updates the
Mathematical-and-Aggregate-Operators.md
wiki page as per issue #6132:The page now follows the structure that was defined in #6131.
Question: Should Available in in the Mathematical Operators section be renamed to something else (e.g. Defined for), because the operators are not part of the core RxJava operators?