package org.jerrymouse.cc;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Storage {
	List<Resource> resources;

	public Resource getResourceByName(String name) {
		return getResourcesMap().get(name);
	}

	private Map<String, Resource> getResourcesMap() {
		Map<String, Resource> map = new HashMap<String, Resource>();
		for (Resource resource : resources) {
			map.put(resource.getName(), resource);
		}
		return map;
	}

	public Resource getResourceByUrl(String url) {
		return null;
	}
}
