Package net.sf.freecol.common.resources
Class ResourceFactory
- java.lang.Object
-
- net.sf.freecol.common.resources.ResourceFactory
-
public class ResourceFactory extends java.lang.ObjectA factory class for creatingResourceinstances.- See Also:
Resource
-
-
Constructor Summary
Constructors Constructor Description ResourceFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourcecreateResource(java.lang.String primaryKey, java.net.URI uri)Returns an instance ofResourcewith the givenURIas 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 oneResourceis created given the sameURI.
-
-
Method Detail
-
createResource
public Resource createResource(java.lang.String primaryKey, java.net.URI uri)
Returns an instance ofResourcewith the givenURIas the parameter.- Parameters:
primaryKey- The primary key.uri- TheURIused when creating the instance.- Returns:
- The
Resourceif created.
-
-