|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectccc.api.types.ResourcePath
public final class ResourcePath
This class models an absolute path to a resource.
Field Summary | |
---|---|
static java.lang.String |
PATH_PATTERN
PATH_PATTERN : Pattern. |
Constructor Summary | |
---|---|
ResourcePath()
Constructor. |
|
ResourcePath(java.util.List<ResourceName> elements)
Constructor. |
|
ResourcePath(ResourceName name)
Constructor. |
|
ResourcePath(java.lang.String pathString)
Constructor. |
Method Summary | |
---|---|
ResourcePath |
append(ResourceName resourceName)
Append a resource name to the end of an existing path. |
java.util.List<ResourceName> |
elements()
Query method. |
java.util.List<ResourceName> |
elementsToTop()
Returns list of all but topmost elements. |
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
static boolean |
isValid(java.lang.String pathString)
Tests whether the specified string is a valid path. |
ResourcePath |
parent()
Return a path minus the bottom most (i.e. |
ResourcePath |
removeTop()
Return a path minus the top most (i.e. |
ResourceName |
top()
Return the top. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PATH_PATTERN
Constructor Detail |
---|
public ResourcePath(java.lang.String pathString)
pathString
- The absolute resource path, represented as a string.public ResourcePath()
public ResourcePath(ResourceName name)
name
- The name of the path element.public ResourcePath(java.util.List<ResourceName> elements)
elements
- A list of resource names.Method Detail |
---|
public static boolean isValid(java.lang.String pathString)
pathString
- The string to test.
public ResourcePath append(ResourceName resourceName)
resourceName
- The name of the resource to append.
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<ResourceName> elements()
names
.
public java.util.List<ResourceName> elementsToTop()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public ResourcePath removeTop()
public ResourceName top()
public ResourcePath parent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |