net.larsan.urd.util.fileset
Class ResourceLocatorImpl

java.lang.Object
  |
  +--net.larsan.urd.util.fileset.ResourceLocatorImpl
All Implemented Interfaces:
ResourceLocator

public class ResourceLocatorImpl
extends java.lang.Object
implements ResourceLocator

This trivial class is a collection of file sets that implement the ResourceLocator interface. It wrappes around a file set array and dispatches resource requests to it's members. This collection cannot contain multiple copies of resource ids, if two file sets reports the same resource path the result is undeterminable.

This collection is not synchronized.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Constructor Summary
ResourceLocatorImpl(FileSet[] sets)
          Create locator
 
Method Summary
 Resource getResource(java.lang.String path)
          Get resource fromt he collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceLocatorImpl

public ResourceLocatorImpl(FileSet[] sets)
Create locator

Method Detail

getResource

public Resource getResource(java.lang.String path)
Get resource fromt he collection. This method returns null if it cannot find a resource for the given path.

Specified by:
getResource in interface ResourceLocator
Parameters:
path - Resource path
Returns:
A resource for the path, or null if not found