|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hivemind.util.AbstractResource
public abstract class AbstractResource
Abstract implementation of Resource
.
Resource instances act as a kind of factory for new instances
of the same type, via newResource(String)
.
Constructor Summary | |
---|---|
protected |
AbstractResource(java.lang.String path)
|
protected |
AbstractResource(java.lang.String path,
java.util.Locale locale)
|
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Returns true if the other object is an instance of the same class, and the paths are equal. |
java.util.Locale |
getLocale()
Returns the locale for which this resource has been localized or null if the resource has not been localized. |
java.lang.String |
getName()
Returns the file name portion of the resource location. |
java.lang.String |
getPath()
Returns the path that represents the resource. |
Resource |
getRelativeResource(java.lang.String name)
Returns at a relative location to this resource. |
protected abstract Resource |
newResource(java.lang.String path)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.hivemind.Resource |
---|
getLocalization, getResourceURL |
Constructor Detail |
---|
protected AbstractResource(java.lang.String path)
protected AbstractResource(java.lang.String path, java.util.Locale locale)
Method Detail |
---|
public java.lang.String getName()
Resource
getName
in interface Resource
public Resource getRelativeResource(java.lang.String name)
Resource
Resource.getResourceURL()
.
getRelativeResource
in interface Resource
name
- name of new resource, possibly as a relative path, or
as an absolute path (starting with a slash).public java.lang.String getPath()
Resource
getPath
in interface Resource
public java.util.Locale getLocale()
Resource
getLocale
in interface Resource
protected abstract Resource newResource(java.lang.String path)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |