package com.hammurapi.common;

import java.util.concurrent.Executor;

/**
 * Executes command in the current thread.
 * This class is used by multi-threaded routines when 
 * another implementation of executor is not available to simplify the logic
 * by not having <code>if (executor==null)</code> branch.
 * @author Pavel Vlasov
 *
 */
public class InlineExecutor implements Executor {
	
	/**
	 * Singleton inline executor.
	 */
	public static final Executor INSTANCE = new InlineExecutor();

	public void execute(Runnable command) {
		command.run();
	}

}
