// Path: app/src/main/java/com/daksh/tmdbsample/base/BasePresenterImpl.java
// public abstract class BasePresenterImpl<V> implements BasePresenter<V> {
// 
//     private WeakReference<V> viewRef;
// 
//     @Override
//     public void attachView(V view) {
//         viewRef = new WeakReference<>(view);
//     }
// 
//     @Override
//     public V getView() throws NullPointerException {
//         if (viewRef != null && viewRef.get() != null) {
//             return viewRef.get();
//         } else {
//             throw new NullPointerException("View is unavailable");
//         }
//     }
// 
//     @Override
//     public void detachView() {
//         viewRef = null;
//     }
// }


import android.support.annotation.NonNull;
import com.daksh.tmdbsample.base.BasePresenterImpl;
package com.daksh.tmdbsample.moviedetail;



/**
 * Created by daksh on 09-Sep-16.
 */
public class MovieDetailPresenter extends BasePresenterImpl<MovieDetailContract.View>
        implements MovieDetailContract.Presenter {

    public MovieDetailPresenter(@NonNull MovieDetailContract.View view) {
// Path: app/src/main/java/com/daksh/tmdbsample/base/BasePresenterImpl.java
// public abstract class BasePresenterImpl<V> implements BasePresenter<V> {
// 
//     private WeakReference<V> viewRef;
// 
//     @Override
//     public void attachView(V view) {
//         viewRef = new WeakReference<>(view);
//     }
// 
//     @Override
//     public V getView() throws NullPointerException {
//         if (viewRef != null && viewRef.get() != null) {
//             return viewRef.get();
//         } else {
//             throw new NullPointerException("View is unavailable");
//         }
//     }
// 
//     @Override
//     public void detachView() {
//         viewRef = null;
//     }
// }


// Path: app/src/main/java/com/daksh/tmdbsample/moviedetail/MovieDetailPresenter.java
import android.support.annotation.NonNull;
import com.daksh.tmdbsample.base.BasePresenterImpl;

package com.daksh.tmdbsample.moviedetail;



/**
 * Created by daksh on 09-Sep-16.
 */
public class MovieDetailPresenter extends BasePresenterImpl<MovieDetailContract.View>
        implements MovieDetailContract.Presenter {

    public MovieDetailPresenter(@NonNull MovieDetailContract.View view) {
        attachView(view);