File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/main/java/rx/javafx/sources Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2020import rx .annotations .Beta ;
2121import rx .subjects .PublishSubject ;
2222import rx .subjects .SerializedSubject ;
23+ import rx .subscriptions .CompositeSubscription ;
2324
2425import java .util .Arrays ;
2526import java .util .List ;
@@ -75,7 +76,9 @@ public Observable<T> toObservable() {
7576 public Subscription add (Observable <T > observable ) {
7677 return observable .subscribe (subject );
7778 }
78- public List <Subscription > addAll (Observable <T >... observables ) {
79- return Arrays .stream (observables ).map (this ::add ).collect (Collectors .toList ());
79+ public CompositeSubscription addAll (Observable <T >... observables ) {
80+ final CompositeSubscription subscriptions = new CompositeSubscription ();
81+ Arrays .stream (observables ).map (this ::add ).forEach (subscriptions ::add );
82+ return subscriptions ;
8083 }
8184}
You can’t perform that action at this time.
0 commit comments