org.carrot2.util.resource
Class PrefixDecoratorLocator

java.lang.Object
  extended by org.carrot2.util.resource.PrefixDecoratorLocator
All Implemented Interfaces:
IResourceLocator

public final class PrefixDecoratorLocator
extends Object
implements IResourceLocator

Prefixes all resource names with a given prefix at lookup time and delegates to another resource locator.


Constructor Summary
PrefixDecoratorLocator(IResourceLocator locator, String prefix)
           
 
Method Summary
 boolean equals(Object target)
          Override equals to return true for locators scanning an identical set of locations.
 IResource[] getAll(String resource)
          Locate all matching resources and return their IResource handles.
 int hashCode()
          Override hash code to return consistent hash code depending on all locations scanned by this locator.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrefixDecoratorLocator

public PrefixDecoratorLocator(IResourceLocator locator,
                              String prefix)
Method Detail

getAll

public IResource[] getAll(String resource)
Description copied from interface: IResourceLocator
Locate all matching resources and return their IResource handles.

Specified by:
getAll in interface IResourceLocator

hashCode

public int hashCode()
Description copied from interface: IResourceLocator
Override hash code to return consistent hash code depending on all locations scanned by this locator.

Specified by:
hashCode in interface IResourceLocator
Overrides:
hashCode in class Object

equals

public boolean equals(Object target)
Description copied from interface: IResourceLocator
Override equals to return true for locators scanning an identical set of locations.

Specified by:
equals in interface IResourceLocator
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) Dawid Weiss, Stanislaw Osinski