// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/manager/utils/rx/SubscriptionUtils.java
// public final class SubscriptionUtils {
// 
//     private SubscriptionUtils() {
//         // no instance
//     }
// 
//     public static void unsubscribe(@Nullable Subscription subscription) {
//         if (subscription != null && !subscription.isUnsubscribed()) {
//             subscription.unsubscribe();
//         }
//     }
// }
// 
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/CountdownMvp.java
// interface View {
// 
//     void showStart();
// 
//     void showValue(String value);
// 
//     void showComplete();
// 
//     void showError(String message);
// 
//     void showCloseButton();
// 
//     void hideCloseButton();
// }
// 
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/manager/CountdownManager.java
// public class CountdownManager {
// 
//     @Inject
//     public CountdownManager() {
//     }
// 
//     public Observable<Integer> countdownFrom(@IntRange(from = 1) int fromValue) {
//         if (fromValue < 1) {
//             throw new IllegalArgumentException("fromValue must be at least 1");
//         }
// 
//         return Observable.interval(1, 1, TimeUnit.SECONDS)
//                 .map(value -> fromValue - value.intValue())
//                 .takeUntil(value -> value <= 0);
//     }
// }


import com.github.simonpercic.mvp.example.aircycle.manager.utils.rx.SubscriptionUtils;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.CountdownMvp.View;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.manager.CountdownManager;
import rx.Observer;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
package com.github.simonpercic.mvp.example.aircycle.ui.countdown;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
class CountdownPresenter implements CountdownMvp.Presenter {

    private final CountdownMvp.View view;
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/manager/utils/rx/SubscriptionUtils.java
// public final class SubscriptionUtils {
// 
//     private SubscriptionUtils() {
//         // no instance
//     }
// 
//     public static void unsubscribe(@Nullable Subscription subscription) {
//         if (subscription != null && !subscription.isUnsubscribed()) {
//             subscription.unsubscribe();
//         }
//     }
// }
// 
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/CountdownMvp.java
// interface View {
// 
//     void showStart();
// 
//     void showValue(String value);
// 
//     void showComplete();
// 
//     void showError(String message);
// 
//     void showCloseButton();
// 
//     void hideCloseButton();
// }
// 
// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/manager/CountdownManager.java
// public class CountdownManager {
// 
//     @Inject
//     public CountdownManager() {
//     }
// 
//     public Observable<Integer> countdownFrom(@IntRange(from = 1) int fromValue) {
//         if (fromValue < 1) {
//             throw new IllegalArgumentException("fromValue must be at least 1");
//         }
// 
//         return Observable.interval(1, 1, TimeUnit.SECONDS)
//                 .map(value -> fromValue - value.intValue())
//                 .takeUntil(value -> value <= 0);
//     }
// }


// Path: example-mvp/src/main/java/com/github/simonpercic/mvp/example/aircycle/ui/countdown/CountdownPresenter.java
import com.github.simonpercic.mvp.example.aircycle.manager.utils.rx.SubscriptionUtils;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.CountdownMvp.View;
import com.github.simonpercic.mvp.example.aircycle.ui.countdown.manager.CountdownManager;
import rx.Observer;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;

package com.github.simonpercic.mvp.example.aircycle.ui.countdown;



/**
 * @author Simon Percic <a href="https://github.com/simonpercic">https://github.com/simonpercic</a>
 */
class CountdownPresenter implements CountdownMvp.Presenter {

    private final CountdownMvp.View view;
    private final CountdownManager countdownManager;