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

Instantly share code, notes, and snippets.

View 0ximDigital's full-sized avatar

Mihael Francekovic 0ximDigital

  • Five ( NYC Five )
  • Croatia
View GitHub Profile
Here is our FavouriteArticleUseCase:
public final class FavouriteArticleUseCase implements CompletableUseCase<Integer> {
private final FeedRepository feedRepository;
public FavouriteArticleUseCase(final FeedRepository feedRepository) {
this.feedRepository = feedRepository;
}
public static void main(String[] args) throws InterruptedException {
Observable.zip(stringObservable().subscribeOn(Schedulers.io()),
integerObservable().subscribeOn(Schedulers.io()),
(s, integer) -> {
timedLog("Got items, zipping");
return s + " " + String.valueOf(integer);
})
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.computation())