This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
final Emitter<String>[] emitter = new Emitter[]{null}; | |
Observable<Integer> integerObservable = Observable.just(0, 1, 2, 3, 4) | |
.concatMap(integer -> { | |
if (emitter[0] != null) { | |
emitter[0].onCompleted(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MediumCardDelegate extends AdapterDelegate<List<EntityViewModel>> { | |
private final Context context; | |
private final ImageManager imageManager; | |
private final DeviceManager deviceManager; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (C) 2015 Fernando Cejas Open Source Project | |
* <p> | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* <p> | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* <p> | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GetEventDetailsInteractorImpl extends GetEventDetailsInteractor { | |
private final EventDataProvider eventDataProvider; | |
public GetEventDetailsInteractorImpl(int eventId, | |
ThreadExecutor threadExecutor, | |
PostExecutionThread postExecutionThread, | |
EventDataProvider eventDataProvider) { | |
super(threadExecutor, postExecutionThread); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SearchPlaceInteractorImpl extends SearchOffsetLimitIneractor { | |
private final PlaceDataProvider placeDataProvider; | |
public SearchPlaceInteractorImpl(ThreadExecutor threadExecutor, | |
PostExecutionThread postExecutionThread, | |
PlaceDataProvider placeDataProvider) { | |
super(threadExecutor, postExecutionThread); | |
this.placeDataProvider = placeDataProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface RedditRepository { | |
Single<List<Reddit>> getPosts(String query, String restrict, String sort, String nsfw, int limit, String date); | |
Single<List<Reddit>> getPostsAfter(String query, String restrict, String sort, String nsfw, int limit, String date, String after); | |
Single<List<Reddit>> getHistory(); | |
Single<List<Reddit>> getHistoryAfter(int date); | |
Single<List<Reddit>> getFavorite(); | |
Single<List<Reddit>> getFavoriteAfter(int date); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getData() = produce<List<Data>>(LooperThread) { | |
var results = realm.where(Data::class.java).findAll() | |
send(map(results)) | |
results.addChangeListener { results -> | |
run { | |
launch(LooperThread) { | |
send(map(results)) | |
} | |
} | |
} |