Closed andreacalia closed 4 years ago
Hmm, I'm afraid for the most general solution (N observables * M types) we can only use objectes, since Java does not support Variadic (var-args) Generics ...
However, we could provide a few overloaded methods for 2,3,4,... (up to how many?) typed arguments for convenience:
<T1,T2> combineLatest(Observable<T1> o1, Observable<T2> o2, BiConsumer<T1,T2> ...)
These can be type safe - internally they can use the more generic List<Object>
functionality ...
Exactly :slightly_smiling_face: . I'm trying to implement it as safe as possible for all cases while providing handy typed options in the static methods for the common cases.
Perfect 🙂
At the moment the
combineLatest
operators allows only to have single classes as input observables..It would be nice to also be able to support different types...
To be defined how the API should look like.. for sure there are multiple solution, I'll make a proposal that suits our current project :slightly_smiling_face: