// Path: resourcesmanager-core/src/main/java/com/gemserk/resources/dataloaders/DataLoader.java
// public abstract class DataLoader<T> {
// 
// 	/**
// 	 * Implements how to load the data.
// 	 */
// 	public abstract T load();
// 
// 	/**
// 	 * Implements how to unload the data, if it is nod automatic and you need to unload stuff by hand.
// 	 */
// 	public void unload(T t) {
// 
// 	}
// 
// 	/**
// 	 * Provides a way to return custom information about the data loader.
// 	 * 
// 	 * @return An object with the custom information.
// 	 */
// 	public Object getMetaData() {
// 		return null;
// 	}
// 
// }
// 
// Path: resourcesmanager-core/src/main/java/com/gemserk/resources/dataloaders/StaticDataLoader.java
// public class StaticDataLoader<T> extends DataLoader<T> {
// 
// 	private final T t;
// 
// 	public StaticDataLoader(T t) {
// 		this.t = t;
// 	}
// 
// 	@Override
// 	public T load() {
// 		return t;
// 	}
// 
// }


import com.gemserk.resources.dataloaders.DataLoader;
import com.gemserk.resources.dataloaders.StaticDataLoader;
package com.gemserk.resources;


/**
 * Provides methods to build a Resources and DataLoaders.
 * 
 * @author acoppes
 * 
 */
public class ResourceFactory {

	/**
	 * Builds a new Resource<T> using a fixed DataLoader<T> which returns always the specified data.
	 * 
	 * @param t
	 *            The data to be used by the Resource.
	 */
	public static <T> Resource<T> resource(T t) {
		return new Resource<T>(staticDataLoader(t));
	}

	/**
	 * Builds a new Resource<T> using the specified DataLoader<T>.
	 * 
	 * @param t
	 *            The data to be used by the Resource.
	 */
	public static <T> Resource<T> resource(DataLoader<T> dataLoader) {
// Path: resourcesmanager-core/src/main/java/com/gemserk/resources/dataloaders/DataLoader.java
// public abstract class DataLoader<T> {
// 
// 	/**
// 	 * Implements how to load the data.
// 	 */
// 	public abstract T load();
// 
// 	/**
// 	 * Implements how to unload the data, if it is nod automatic and you need to unload stuff by hand.
// 	 */
// 	public void unload(T t) {
// 
// 	}
// 
// 	/**
// 	 * Provides a way to return custom information about the data loader.
// 	 * 
// 	 * @return An object with the custom information.
// 	 */
// 	public Object getMetaData() {
// 		return null;
// 	}
// 
// }
// 
// Path: resourcesmanager-core/src/main/java/com/gemserk/resources/dataloaders/StaticDataLoader.java
// public class StaticDataLoader<T> extends DataLoader<T> {
// 
// 	private final T t;
// 
// 	public StaticDataLoader(T t) {
// 		this.t = t;
// 	}
// 
// 	@Override
// 	public T load() {
// 		return t;
// 	}
// 
// }


// Path: resourcesmanager-core/src/main/java/com/gemserk/resources/ResourceFactory.java
import com.gemserk.resources.dataloaders.DataLoader;
import com.gemserk.resources.dataloaders.StaticDataLoader;

package com.gemserk.resources;


/**
 * Provides methods to build a Resources and DataLoaders.
 * 
 * @author acoppes
 * 
 */
public class ResourceFactory {

	/**
	 * Builds a new Resource<T> using a fixed DataLoader<T> which returns always the specified data.
	 * 
	 * @param t
	 *            The data to be used by the Resource.
	 */
	public static <T> Resource<T> resource(T t) {
		return new Resource<T>(staticDataLoader(t));
	}

	/**
	 * Builds a new Resource<T> using the specified DataLoader<T>.
	 * 
	 * @param t
	 *            The data to be used by the Resource.
	 */
	public static <T> Resource<T> resource(DataLoader<T> dataLoader) {
		return new Resource<T>(dataLoader);