|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.enhydra.shark.xpdl.Path
public class Path
Paths are always maintained in canonicalized form. That is, parent
references (i.e., ../../
) and duplicate separators are
resolved. For example,
new Path("/a/b").append("../foo/bar")will yield the path
/a/foo/bar
This class is not intended to be subclassed by clients but may be instantiated.
Field Summary | |
---|---|
static char |
DEVICE_SEPARATOR
Device separator character constant ":" used in paths. |
static Path |
EMPTY
Constant value containing the empty path with no device. |
static Path |
ROOT
Constant value containing the root path with no device. |
static char |
SEPARATOR
Path separator character constant "/" used in paths. |
Constructor Summary | |
---|---|
Path(java.lang.String fullPath)
Constructs a new path from the given string path. |
|
Path(java.lang.String device,
java.lang.String path)
Constructs a new path from the given device id and string path. |
Method Summary | |
---|---|
static java.lang.String |
getRelativePath(Path fullPath,
Path fBasePath)
|
boolean |
isAbsolute()
|
int |
matchingFirstSegments(Path anotherPath)
|
java.lang.String |
segment(int index)
|
int |
segmentCount()
|
java.lang.String[] |
segments()
|
Path |
setDevice(java.lang.String value)
|
java.lang.String |
toOSString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char SEPARATOR
public static final char DEVICE_SEPARATOR
public static final Path ROOT
public static final Path EMPTY
Constructor Detail |
---|
public Path(java.lang.String fullPath)
fullPath
- the string pathpublic Path(java.lang.String device, java.lang.String path)
device
- the device idpath
- the string pathsetDevice(java.lang.String)
Method Detail |
---|
public boolean isAbsolute()
public int matchingFirstSegments(Path anotherPath)
public java.lang.String segment(int index)
public int segmentCount()
public java.lang.String[] segments()
public Path setDevice(java.lang.String value)
public java.lang.String toOSString()
public static java.lang.String getRelativePath(Path fullPath, Path fBasePath)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |