Package net.sf.freecol.common.resources
Class ResourceFactory
- java.lang.Object
-
- net.sf.freecol.common.resources.ResourceFactory
-
public class ResourceFactory extends java.lang.Object
A factory class for creatingResource
instances.- See Also:
Resource
-
-
Constructor Summary
Constructors Constructor Description ResourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
createResource(java.lang.String primaryKey, java.net.URI uri)
Returns an instance ofResource
with the givenURI
as the parameter.
-
-
-
Field Detail
-
logger
private static final java.util.logging.Logger logger
-
resources
private final java.util.Map<java.net.URI,Resource> resources
Ensures that only oneResource
is created given the sameURI
.
-
-
Method Detail
-
createResource
public Resource createResource(java.lang.String primaryKey, java.net.URI uri)
Returns an instance ofResource
with the givenURI
as the parameter.- Parameters:
primaryKey
- The primary key.uri
- TheURI
used when creating the instance.- Returns:
- The
Resource
if created.
-
-