Skip to content

API Design Review: Instance Concat/Merge/Flatten/Zip #687

Closed
@benjchristensen

Description

@benjchristensen

An idea that has floated for the past year (including #295) is to add instance method for flatten. During API review this came up again along with instance methods for each of the combination operators: concat, merge/flatten, zip.

Because of how Java types work and without targeted extension methods we can not only make these apply to Observable<Observable<T>> and be type safe.

We could however do things like ...

If we have an `Observable<Observable>:

  • observable.flatten().cast(MyType.class)
  • observable.flattenTo(MyType.class)

If we have an Observable<T> it would basically just pass-thru without applying the flattening since it's already flat.

/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