uk.co.bubblebearapps.motionaiclient.internal.di.modules.DomainModule.java Source code

Java tutorial

Introduction

Here is the source code for uk.co.bubblebearapps.motionaiclient.internal.di.modules.DomainModule.java

Source

/*
 * Copyright 2017 Bubblebear Apps Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package uk.co.bubblebearapps.motionaiclient.internal.di.modules;

import org.joda.time.DateTimeComparator;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import uk.co.bubblebearapps.motionaiclient.UIThread;
import uk.co.bubblebearapps.motionaiclient.executor.JobExecutor;
import uk.co.bubblebearapps.motionaiclient.executor.PostExecutionThread;
import uk.co.bubblebearapps.motionaiclient.executor.ThreadExecutor;

/**
 * Created by joefr_000 on 24/01/2017.
 */

@Module
public class DomainModule {

    @Provides
    @Singleton
    ThreadExecutor provideThreadExecutor(JobExecutor jobExecutor) {
        return jobExecutor;
    }

    @Provides
    @Singleton
    PostExecutionThread providePostExecutionThread(UIThread uiThread) {
        return uiThread;
    }

    @Provides
    @Singleton
    DateTimeComparator provideDateTimeComparator() {
        return DateTimeComparator.getInstance();
    }

}