Skip to content

Observable.sort method #4263

Closed
Closed
@davidmoten

Description

@davidmoten

I'd like to add Observable.sort (or Observable.sorted) to the API. I tried this a couple of years ago and it was knocked back but now that people are getting used to the offerings of java 8 streams for instance (and its .sorted() method) I thought I'd raise it again.

In particular to sort a stream at the moment I have to call

observable.toSortedList().flatMapIterable(x -> x)

or using an internal class:

observable.toSortedList().flatMapIterable(UtilityFunctions.<T>identity())

This is poor for discoverability, hard to read, and pretty disappointing when I want to show off RxJava's coolness.

Any takers?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions