Merged
Conversation
| * all other items emitted by the Observable | ||
| * @return an Observable that emits the items emitted by the source Observable in sorted order | ||
| */ | ||
| @Experimental |
Author
There was a problem hiding this comment.
wasn't sure to name it sorted or sort, what do u think ?
Collaborator
There was a problem hiding this comment.
may as well call it sorted I think
Current coverage is 84.48% (diff: 100%)@@ 1.x #4264 diff @@
==========================================
Files 268 268
Lines 17477 17477
Methods 0 0
Messages 0 0
Branches 2662 2662
==========================================
+ Hits 14761 14765 +4
+ Misses 1861 1856 -5
- Partials 855 856 +1
|
| /** | ||
| * Returns an Observable that emits the events emitted by source Observable, in a | ||
| * sorted order. Each item emitted by the Observable must implement {@link Comparable} with respect to all | ||
| * other items in the sequence. |
Member
There was a problem hiding this comment.
Please add a note about long or non-terminating or infinite sources as they may run out of memory or never finish collecting the elements to be sorted.
Member
|
I'd have implemented a single operator for it but this will also do. |
| public class OperatorSortedTest { | ||
|
|
||
| @Test | ||
| public void testSortedList() { |
Member
|
Looks generally okay but I can't tell how often this shortcut is needed. I hope for some community feedback on this. |
| testSubscriber.assertNotCompleted(); | ||
| } | ||
|
|
||
| private final class NonComparable{ |
Member
|
👍 |
1 similar comment
Collaborator
|
👍 |
This was referenced Aug 2, 2016
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR Observable.sorted Method, I hope it addresses this #4263 correctly.