Skip to content

API Design Review: Aggregate and Math Functions #671

@benjchristensen

Description

@benjchristensen

Several operators on rx.Observable are intended for aggregation and potentially dangerous on long-running or infinite Observables. Similar to how blocking operators were moved to BlockingObservable it has been suggested that aggregation operators be collected into an AggregateObservable or something similarly named. This could be further broken into AggregateObservable and NumberObservable for ones specifically operating on numbers as the type would be <? extends Number> rather than <T>.

Some of these operators include:

  • average*
  • max (add maxBy (keySelector))
  • min (add minBy)
  • sum*
  • contains
  • count
  • longCount
  • toList
  • reduce

/cc @headinthebox and @jhusain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions