import java.util.*;
public class ComandoFactory {
	private static ComandoFactory instance = new ComandoFactory();
	private HashMap comandosMap = new HashMap();
	private ComandoFactory() {
		comandosMap.put("new", new NewComando());
		comandosMap.put("delete", new DeleteComando());
		comandosMap.put("all", new AllComando());
		comandosMap.put("get", new GetComando());
	}
	public static ComandoFactory getInstance() {
		return instance;
	}
	
	public Comando getComando(String comando) {
		return (Comando)comandosMap.get(comando);
	}
}
