// Path: privvy/src/main/java/com/metova/privvy/PrivvyPresenter.java
// public abstract class PrivvyPresenter<V extends PrivvyContract.View, I extends PrivvyContract.Interactor> extends CompositeDisposer implements PrivvyContract.Presenter<V>{
// 
//     private V view;
// 
//     private I interactor;
// 
//     protected PrivvyPresenter(I interactor) {
//         this.interactor = interactor;
//     }
// 
//     @Override
//     public void setView(V view) {
//         this.view = view;
//         if (view != null) {
//             setupSubscriptions();
//         }
//     }
// 
//     abstract protected void setupSubscriptions();
// 
//     @CallSuper
//     @Override
//     public void onDestroyView() {
//         clearDisposables();
//         setView(null);
//         interactor.dispose();
//     }
// 
//     protected V getView() {
//         return this.view;
//     }
// 
//     protected I getInteractor() {
//         return this.interactor;
//     }
// 
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/models/Number.java
// public class Number {
// 
//     public int value;
// 
//     public Number() {
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/ui/floatingnumber/NumberUpdateYoke.java
// public interface NumberUpdateYoke {
// 
//     Flowable<Integer> onNumberChanged();
// 
//     void changeNumber(int newNumber);
// }


import com.metova.privvy.PrivvyPresenter;
import com.metova.privvy.sample.models.Number;
import com.metova.privvy.sample.ui.floatingnumber.NumberUpdateYoke;
import timber.log.Timber;
package com.metova.privvy.sample.ui.floatingnumber.number;



class NumberPresenter extends PrivvyPresenter<NumberContract.View, NumberContract.Interactor> implements NumberContract.Presenter {

    private NumberUpdateYoke numberUpdateYoke;

    private NumberMapper mapper;

    NumberPresenter(NumberContract.Interactor interactor, NumberUpdateYoke numberUpdateYoke) {
        super(interactor);
        this.numberUpdateYoke = numberUpdateYoke;
        this.mapper = new NumberMapper();
    }

    @Override
    protected void setupSubscriptions() {
        addDisposables(
                getInteractor().getNumber().subscribe(this::onNumberUpdated),
                getInteractor().onNumberUpdated().subscribe(this::onNumberUpdated),
                numberUpdateYoke.onNumberChanged().subscribe(getView()::updateFontSize)
        );
    }

    @Override
// Path: privvy/src/main/java/com/metova/privvy/PrivvyPresenter.java
// public abstract class PrivvyPresenter<V extends PrivvyContract.View, I extends PrivvyContract.Interactor> extends CompositeDisposer implements PrivvyContract.Presenter<V>{
// 
//     private V view;
// 
//     private I interactor;
// 
//     protected PrivvyPresenter(I interactor) {
//         this.interactor = interactor;
//     }
// 
//     @Override
//     public void setView(V view) {
//         this.view = view;
//         if (view != null) {
//             setupSubscriptions();
//         }
//     }
// 
//     abstract protected void setupSubscriptions();
// 
//     @CallSuper
//     @Override
//     public void onDestroyView() {
//         clearDisposables();
//         setView(null);
//         interactor.dispose();
//     }
// 
//     protected V getView() {
//         return this.view;
//     }
// 
//     protected I getInteractor() {
//         return this.interactor;
//     }
// 
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/models/Number.java
// public class Number {
// 
//     public int value;
// 
//     public Number() {
//     }
// }
// 
// Path: sample/src/main/java/com/metova/privvy/sample/ui/floatingnumber/NumberUpdateYoke.java
// public interface NumberUpdateYoke {
// 
//     Flowable<Integer> onNumberChanged();
// 
//     void changeNumber(int newNumber);
// }


// Path: sample/src/main/java/com/metova/privvy/sample/ui/floatingnumber/number/NumberPresenter.java
import com.metova.privvy.PrivvyPresenter;
import com.metova.privvy.sample.models.Number;
import com.metova.privvy.sample.ui.floatingnumber.NumberUpdateYoke;
import timber.log.Timber;

package com.metova.privvy.sample.ui.floatingnumber.number;



class NumberPresenter extends PrivvyPresenter<NumberContract.View, NumberContract.Interactor> implements NumberContract.Presenter {

    private NumberUpdateYoke numberUpdateYoke;

    private NumberMapper mapper;

    NumberPresenter(NumberContract.Interactor interactor, NumberUpdateYoke numberUpdateYoke) {
        super(interactor);
        this.numberUpdateYoke = numberUpdateYoke;
        this.mapper = new NumberMapper();
    }

    @Override
    protected void setupSubscriptions() {
        addDisposables(
                getInteractor().getNumber().subscribe(this::onNumberUpdated),
                getInteractor().onNumberUpdated().subscribe(this::onNumberUpdated),
                numberUpdateYoke.onNumberChanged().subscribe(getView()::updateFontSize)
        );
    }

    @Override
    public void onNumberUpdated(Number number) {