net.sf.freecol.common.resources
Class Resource

java.lang.Object
  extended by net.sf.freecol.common.resources.Resource
Direct Known Subclasses:
ColorResource, ImageResource, SZAResource, VideoResource

public abstract class Resource
extends java.lang.Object

Represents a resource that either has been or can be loaded using a URI. There can only be one instance of Resource having the same (as in URI's equals, not the identity) URI. Instances are created using ResourceManager#createResource(URI).


Field Summary
private  java.net.URI resourceLocator
          The URI used when loading this resource.
 
Constructor Summary
Resource(java.net.URI resourceLocator)
          Do not use directly.
 
Method Summary
 java.net.URI getResourceLocator()
          Returns the URI used for loading the resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resourceLocator

private final java.net.URI resourceLocator
The URI used when loading this resource.

Constructor Detail

Resource

Resource(java.net.URI resourceLocator)
Do not use directly.

Parameters:
resourceLocator - The URI used when loading this resource.
See Also:
ResourceFactory.createResource(URI)
Method Detail

getResourceLocator

public java.net.URI getResourceLocator()
Returns the URI used for loading the resource.

Returns:
The URI.