package de.siphalor.was.util;

/**
 * An interface for classes that manage some kind of resources.
 * @param <T> The type of the resources
 */
public interface ResourceManager<T> {
	/**
	 * Clear this manager's resources.
	 */
	void clear();

	/**
	 * Gets a resource by the given id.
	 * @param id The resource's id
	 * @return The associated resource
	 */
	T get(String id);

	/**
	 * Registers a new resource.
	 * @param id The resource's id
	 * @param value The resource
	 */
	void register(String id, T value);
}
