Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

MergeWith, ConcatWith, AmbWith#1357

Merged
benjchristensen merged 1 commit intoReactiveX:masterfrom
benjchristensen:mergeWith-and-friends
Jun 12, 2014
Merged

MergeWith, ConcatWith, AmbWith#1357
benjchristensen merged 1 commit intoReactiveX:masterfrom
benjchristensen:mergeWith-and-friends

Conversation

@benjchristensen
Copy link
Member

Single-arity instance versions of merge, concat and amb.
Since we can't use the merge/concat/amb names on both static and instance methods, these have the With suffix, which actually reads quite well.

o.mergeWith(o2).subscribe(ts);
o.concatWith(o2).subscribe(ts);
o.ambWith(o2).subscribe(ts);

If we feel the need for more arities fine, but I wanted to start simple.

This originated from discussions with @headinthebox and over a year of wanting instance methods for merge.

Single-arity instance versions of merge, concat and amb.
Since we can't use the `merge`/`concat`/`amb` names on both static and instance methods, these have the `With` suffix, which actually reads quite well.

```java
o.mergeWith(o2).subscribe(ts);
o.concatWith(o2).subscribe(ts);
o.ambWith(o2).subscribe(ts);
```

If we feel the need for more arities fine, but I wanted to start simple.

This originated from discussions with @headinthebox and over a year of wanting instance methods for `merge`.
@cloudbees-pull-request-builder

RxJava-pull-requests #1276 SUCCESS
This pull request looks good

@headinthebox
Copy link
Contributor

Like!

benjchristensen added a commit that referenced this pull request Jun 12, 2014
@benjchristensen benjchristensen merged commit 460459f into ReactiveX:master Jun 12, 2014
@benjchristensen benjchristensen deleted the mergeWith-and-friends branch June 12, 2014 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants