// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/contract/PresenterContract.java
// public interface PresenterContract<VM extends ViewModel>
// {
// 
// 	/**
// 	 * Initialize an instace of ViewModel and return it
// 	 *
// 	 * @return VM - freshly created instance of {@link ViewModel}
// 	 */
// 	VM initViewModel();
// 
// 	/**
// 	 * Return an instance of specific ViewModel
// 	 *
// 	 * @return VM - instance of {@link ViewModel}
// 	 */
// 	VM getViewModel();
// 
// 	/**
// 	 * onPresenterDetached impl for Presenter - should be called in a lifecycle of presenter held by a view
// 	 */
// 	void onPresenterDetached(boolean wasDestroyed);
// 
// 	/**
// 	 * onPresenterAttached impl for Presenter - should be called in a lifecycle of presenter held by a view
// 	 */
// 	void onPresenterAttached(boolean firstAttachment);
// 
// }
// 
// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/util/ViewWrapper.java
// public interface ViewWrapper<VB extends ViewDataBinding, PR extends Presenter>
// {
// 	/**
// 	 * Get layout id for layout inflation to the View.
// 	 *
// 	 * @return LayoutId from R.java
// 	 */
// 	int getLayoutId();
// 
// 	/**
// 	 * Gets context.
// 	 *
// 	 * @return provided instance of {@link Context}
// 	 */
// 	Context getContext();
// 
// 	/**
// 	 * Get specific instance of any {@link Presenter} descendant.
// 	 *
// 	 * @return Defined instance of {@link Presenter}
// 	 */
// 	PR getPresenter();
// 
// 	/**
// 	 * Get provided descendant of {@link ViewDataBinding} instance.
// 	 *
// 	 * @return Provided instance of {@link ViewDataBinding} instance
// 	 */
// 	VB getBinding();
// 
// 	/**
// 	 * Get an instance of {@link Activity} holding our {@link Presenter} instance.
// 	 *
// 	 * @return Provided instance of {@link Activity}
// 	 */
// 	Activity getActivityContext();
// }
// 
// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/viewmodel/ViewModel.java
// public abstract class ViewModel<I extends Interactor<IDC>, IDC> extends BaseObservable implements ViewModelContract<I>, InteractorContract
// {
// 
// 	/**
// 	 * ViewWrapper instance to provide all necessary View related objects to all of the descendants.
// 	 */
// 	private ViewWrapper<?, ? extends Presenter> mWrapper;
// 
// 	/**
// 	 * An instance of {@link Interactor} type specific for this ViewModel instance.
// 	 */
// 	private I mInteractor;
// 
// 
// 	/**
// 	 * Bind an already defined ViewWrapper instance with provided objects to our ViewWrapper instance.
// 	 *
// 	 * @param viewWrapper {@link ViewWrapper} initialized instance to provide object to lower levels
// 	 */
// 	public void bind(ViewWrapper<?, ? extends Presenter> viewWrapper)
// 	{
// 		this.mWrapper = viewWrapper;
// 	}
// 
// 
// 	/**
// 	 * Get our specific {@link Interactor} type instance.
// 	 *
// 	 * @return {@link Interactor} type instance
// 	 */
// 	public IDC getInteractor()
// 	{
// 		return this.mInteractor.getInteractorDataContract();
// 	}
// 
// 
// 	@Override
// 	public void onViewModelAttached(boolean firstAttachment)
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelDetached(boolean wasDestroyed)
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelRemoved()
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelCreated()
// 	{
// 		this.mInteractor = initInteractor();
// 		this.mInteractor.bind(this);
// 		this.mInteractor.init();
// 	}
// 
// 
// 	@Override
// 	public Resources getResources()
// 	{
// 		return mWrapper.getContext().getResources();
// 	}
// 
// 
// 	@Override
// 	public Context getContext()
// 	{
// 		return mWrapper.getContext();
// 	}
// 
// 
// }


import android.content.Context;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import java.io.Serializable;
import cz.helmisek.android.androidviper.core.contract.PresenterContract;
import cz.helmisek.android.androidviper.core.util.ViewWrapper;
import cz.helmisek.android.androidviper.core.viewmodel.ViewModel;
package cz.helmisek.android.androidviper.core.presenter;





/**
 * Presenter class implementation, which is the most important layer between the View and our structure.
 * Presenter class should handle View interactions and respond to them by defined actions in our layer structure.
 *
 * @param <VM> an instance of {@link ViewModel} dependant
 * @param <VB> an instance of {@link ViewDataBinding} dependant
 */
public abstract class Presenter<VM extends ViewModel, VB extends ViewDataBinding> implements PresenterContract<VM>, Serializable
{
	/**
	 * Bounded {@link ViewModel} descendant instance.
	 * Used to control View states, behavior and data on View interactions.
	 */
	private VM mViewModel;

	/**
	 * ViewWrapper instance to provide all necessary View related objects to all of the descendants.
	 */
// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/contract/PresenterContract.java
// public interface PresenterContract<VM extends ViewModel>
// {
// 
// 	/**
// 	 * Initialize an instace of ViewModel and return it
// 	 *
// 	 * @return VM - freshly created instance of {@link ViewModel}
// 	 */
// 	VM initViewModel();
// 
// 	/**
// 	 * Return an instance of specific ViewModel
// 	 *
// 	 * @return VM - instance of {@link ViewModel}
// 	 */
// 	VM getViewModel();
// 
// 	/**
// 	 * onPresenterDetached impl for Presenter - should be called in a lifecycle of presenter held by a view
// 	 */
// 	void onPresenterDetached(boolean wasDestroyed);
// 
// 	/**
// 	 * onPresenterAttached impl for Presenter - should be called in a lifecycle of presenter held by a view
// 	 */
// 	void onPresenterAttached(boolean firstAttachment);
// 
// }
// 
// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/util/ViewWrapper.java
// public interface ViewWrapper<VB extends ViewDataBinding, PR extends Presenter>
// {
// 	/**
// 	 * Get layout id for layout inflation to the View.
// 	 *
// 	 * @return LayoutId from R.java
// 	 */
// 	int getLayoutId();
// 
// 	/**
// 	 * Gets context.
// 	 *
// 	 * @return provided instance of {@link Context}
// 	 */
// 	Context getContext();
// 
// 	/**
// 	 * Get specific instance of any {@link Presenter} descendant.
// 	 *
// 	 * @return Defined instance of {@link Presenter}
// 	 */
// 	PR getPresenter();
// 
// 	/**
// 	 * Get provided descendant of {@link ViewDataBinding} instance.
// 	 *
// 	 * @return Provided instance of {@link ViewDataBinding} instance
// 	 */
// 	VB getBinding();
// 
// 	/**
// 	 * Get an instance of {@link Activity} holding our {@link Presenter} instance.
// 	 *
// 	 * @return Provided instance of {@link Activity}
// 	 */
// 	Activity getActivityContext();
// }
// 
// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/viewmodel/ViewModel.java
// public abstract class ViewModel<I extends Interactor<IDC>, IDC> extends BaseObservable implements ViewModelContract<I>, InteractorContract
// {
// 
// 	/**
// 	 * ViewWrapper instance to provide all necessary View related objects to all of the descendants.
// 	 */
// 	private ViewWrapper<?, ? extends Presenter> mWrapper;
// 
// 	/**
// 	 * An instance of {@link Interactor} type specific for this ViewModel instance.
// 	 */
// 	private I mInteractor;
// 
// 
// 	/**
// 	 * Bind an already defined ViewWrapper instance with provided objects to our ViewWrapper instance.
// 	 *
// 	 * @param viewWrapper {@link ViewWrapper} initialized instance to provide object to lower levels
// 	 */
// 	public void bind(ViewWrapper<?, ? extends Presenter> viewWrapper)
// 	{
// 		this.mWrapper = viewWrapper;
// 	}
// 
// 
// 	/**
// 	 * Get our specific {@link Interactor} type instance.
// 	 *
// 	 * @return {@link Interactor} type instance
// 	 */
// 	public IDC getInteractor()
// 	{
// 		return this.mInteractor.getInteractorDataContract();
// 	}
// 
// 
// 	@Override
// 	public void onViewModelAttached(boolean firstAttachment)
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelDetached(boolean wasDestroyed)
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelRemoved()
// 	{
// 	}
// 
// 
// 	@Override
// 	public void onViewModelCreated()
// 	{
// 		this.mInteractor = initInteractor();
// 		this.mInteractor.bind(this);
// 		this.mInteractor.init();
// 	}
// 
// 
// 	@Override
// 	public Resources getResources()
// 	{
// 		return mWrapper.getContext().getResources();
// 	}
// 
// 
// 	@Override
// 	public Context getContext()
// 	{
// 		return mWrapper.getContext();
// 	}
// 
// 
// }


// Path: lib/src/main/java/cz/helmisek/android/androidviper/core/presenter/Presenter.java
import android.content.Context;
import android.databinding.ViewDataBinding;
import android.support.annotation.NonNull;
import java.io.Serializable;
import cz.helmisek.android.androidviper.core.contract.PresenterContract;
import cz.helmisek.android.androidviper.core.util.ViewWrapper;
import cz.helmisek.android.androidviper.core.viewmodel.ViewModel;

package cz.helmisek.android.androidviper.core.presenter;





/**
 * Presenter class implementation, which is the most important layer between the View and our structure.
 * Presenter class should handle View interactions and respond to them by defined actions in our layer structure.
 *
 * @param <VM> an instance of {@link ViewModel} dependant
 * @param <VB> an instance of {@link ViewDataBinding} dependant
 */
public abstract class Presenter<VM extends ViewModel, VB extends ViewDataBinding> implements PresenterContract<VM>, Serializable
{
	/**
	 * Bounded {@link ViewModel} descendant instance.
	 * Used to control View states, behavior and data on View interactions.
	 */
	private VM mViewModel;

	/**
	 * ViewWrapper instance to provide all necessary View related objects to all of the descendants.
	 */
	private ViewWrapper<VB, ? extends Presenter> mWrapper;