All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.mrgrd56.mgutils.delegate.DefaultRunnableFactory Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package ru.mrgrd56.mgutils.delegate;

import ru.mrgrd56.mgutils.concurrent.Lazy;

/**
 * @since 1.1
 */
public class DefaultRunnableFactory implements RunnableFactory {
    private static final Lazy instance = new Lazy<>(DefaultRunnableFactory::new);

    private DefaultRunnableFactory() { }

    public static DefaultRunnableFactory getInstance() {
        return instance.get();
    }

    @Override
    public Runnable create(Runnable runnable) {
        return runnable;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy