// Path: app/src/main/java/com/xurxodev/moviesandroidkata/domain/boundary/executor/AsyncExecutor.java
// public interface AsyncExecutor {
// 
//     void run(final UseCase interactor);
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/domain/boundary/executor/MainExecutor.java
// public interface MainExecutor {
//     void run(final Runnable runnable);
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/presentation/executor/ThreadExecutor.java
// public class ThreadExecutor implements AsyncExecutor {
// 
//     private static final int CORE_POOL_SIZE = 3;
//     private static final int MAX_POOL_SIZE = 5;
//     private static final int KEEP_ALIVE_TIME = 120;
//     private static final TimeUnit TIME_UNIT = TimeUnit.SECONDS;
//     private static final BlockingQueue<Runnable> WORK_QUEUE = new LinkedBlockingQueue<Runnable>();
// 
//     private ThreadPoolExecutor threadPoolExecutor;
// 
//     public ThreadExecutor() {
//         int corePoolSize = CORE_POOL_SIZE;
//         int maxPoolSize = MAX_POOL_SIZE;
//         int keepAliveTime = KEEP_ALIVE_TIME;
//         TimeUnit timeUnit = TIME_UNIT;
//         BlockingQueue<Runnable> workQueue = WORK_QUEUE;
//         threadPoolExecutor =
//                 new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime, timeUnit, workQueue);
//     }
// 
//     @Override
//     public void run(final UseCase interactor) {
//         if (interactor == null) {
//             throw new IllegalArgumentException("Interactor to execute can't be null");
//         }
// 
//         threadPoolExecutor.submit(new Runnable() {
//             @Override public void run() {
//                 interactor.run();
//             }
//         });
//     }
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/presentation/executor/UIThreadExecutor.java
// public class UIThreadExecutor implements MainExecutor {
// 
//     private Handler handler;
// 
//     @Inject
//     public UIThreadExecutor() {
//         this.handler = new Handler(Looper.getMainLooper());
//     }
// 
//     public void run(Runnable runnable) {
//         handler.post(runnable);
//     }
// }


import android.app.Application;
import com.xurxodev.moviesandroidkata.domain.boundary.executor.AsyncExecutor;
import com.xurxodev.moviesandroidkata.domain.boundary.executor.MainExecutor;
import com.xurxodev.moviesandroidkata.presentation.executor.ThreadExecutor;
import com.xurxodev.moviesandroidkata.presentation.executor.UIThreadExecutor;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
package com.xurxodev.moviesandroidkata.di.module;





@Module
public class AppModule {

    Application mApplication;

    public AppModule(Application application) {
        mApplication = application;
    }

    @Provides
    @Singleton
    Application providesApplication() {
        return mApplication;
    }

    @Provides
    @Singleton
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/domain/boundary/executor/AsyncExecutor.java
// public interface AsyncExecutor {
// 
//     void run(final UseCase interactor);
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/domain/boundary/executor/MainExecutor.java
// public interface MainExecutor {
//     void run(final Runnable runnable);
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/presentation/executor/ThreadExecutor.java
// public class ThreadExecutor implements AsyncExecutor {
// 
//     private static final int CORE_POOL_SIZE = 3;
//     private static final int MAX_POOL_SIZE = 5;
//     private static final int KEEP_ALIVE_TIME = 120;
//     private static final TimeUnit TIME_UNIT = TimeUnit.SECONDS;
//     private static final BlockingQueue<Runnable> WORK_QUEUE = new LinkedBlockingQueue<Runnable>();
// 
//     private ThreadPoolExecutor threadPoolExecutor;
// 
//     public ThreadExecutor() {
//         int corePoolSize = CORE_POOL_SIZE;
//         int maxPoolSize = MAX_POOL_SIZE;
//         int keepAliveTime = KEEP_ALIVE_TIME;
//         TimeUnit timeUnit = TIME_UNIT;
//         BlockingQueue<Runnable> workQueue = WORK_QUEUE;
//         threadPoolExecutor =
//                 new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime, timeUnit, workQueue);
//     }
// 
//     @Override
//     public void run(final UseCase interactor) {
//         if (interactor == null) {
//             throw new IllegalArgumentException("Interactor to execute can't be null");
//         }
// 
//         threadPoolExecutor.submit(new Runnable() {
//             @Override public void run() {
//                 interactor.run();
//             }
//         });
//     }
// }
// 
// Path: app/src/main/java/com/xurxodev/moviesandroidkata/presentation/executor/UIThreadExecutor.java
// public class UIThreadExecutor implements MainExecutor {
// 
//     private Handler handler;
// 
//     @Inject
//     public UIThreadExecutor() {
//         this.handler = new Handler(Looper.getMainLooper());
//     }
// 
//     public void run(Runnable runnable) {
//         handler.post(runnable);
//     }
// }


// Path: app/src/main/java/com/xurxodev/moviesandroidkata/di/module/AppModule.java
import android.app.Application;
import com.xurxodev.moviesandroidkata.domain.boundary.executor.AsyncExecutor;
import com.xurxodev.moviesandroidkata.domain.boundary.executor.MainExecutor;
import com.xurxodev.moviesandroidkata.presentation.executor.ThreadExecutor;
import com.xurxodev.moviesandroidkata.presentation.executor.UIThreadExecutor;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;

package com.xurxodev.moviesandroidkata.di.module;





@Module
public class AppModule {

    Application mApplication;

    public AppModule(Application application) {
        mApplication = application;
    }

    @Provides
    @Singleton
    Application providesApplication() {
        return mApplication;
    }

    @Provides
    @Singleton
    public AsyncExecutor provideAsyncExecutor() {