Class EngineResourceSet
java.lang.Object
com.blackrook.engine.EngineResourceSet
The thing that holds and manages all engine resources (by class).
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEngineResourceSet.ResourceSet<R extends EngineResource>Mapping of name-to-resource and id-to-resource. -
Method Summary
Modifier and TypeMethodDescription<T extends EngineResource>
voidaddResource(T resource) <T extends EngineResource>
TgetResource(Class<T> clazz, String id) Returns a resource of a particular type and id.<T extends EngineResource>
EngineResourceSet.ResourceSet<T> getResourceSet(Class<T> clazz) Returns the resource list that stores a set of resources.
-
Method Details
-
addResource
-
getResourceSet
Returns the resource list that stores a set of resources.- Type Parameters:
T- the type contained by the list.- Parameters:
clazz- the resource class to retrieve the list of.- Returns:
- the corresponding list of resources, or null if no corresponding set.
-
getResource
Returns a resource of a particular type and id.- Type Parameters:
T- the type contained by the list.- Parameters:
clazz- the resource class to retrieve the list of.id- the id of the resource to fetch.- Returns:
- the corresponding resource, or null if no corresponding set or id.
-