|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2pMapReduce.mapreduceModule.Path
public class Path
Names a file or directory in a FileSystem
.
Path strings use slash as the directory separator. A path string is
absolute if it begins with a slash.
Field Summary | |
---|---|
static java.lang.String |
CUR_DIR
|
static java.lang.String |
SEPARATOR
The directory separator, a slash. |
static char |
SEPARATOR_CHAR
|
Constructor Summary | |
---|---|
Path(Path parent,
Path child)
Resolve a child path against a parent path. |
|
Path(Path parent,
java.lang.String child)
Resolve a child path against a parent path. |
|
Path(java.lang.String pathString)
Construct a path from a String. |
|
Path(java.lang.String parent,
Path child)
Resolve a child path against a parent path. |
|
Path(java.lang.String parent,
java.lang.String child)
Resolve a child path against a parent path. |
|
Path(java.lang.String scheme,
java.lang.String authority,
java.lang.String path)
Construct a Path from components. |
|
Path(java.net.URI aUri)
Construct a path from a URI |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
int |
depth()
Return the number of elements in this path. |
boolean |
equals(java.lang.Object o)
|
java.lang.String |
getName()
Returns the final component of this path. |
Path |
getParent()
Returns the parent of a path or null if at root. |
int |
hashCode()
|
boolean |
isAbsolute()
There is some ambiguity here. |
boolean |
isUriPathAbsolute()
True if the path component (i.e. directory) of this URI is absolute. |
Path |
makeQualified(java.net.URI defaultUri,
Path workingDir)
Returns a qualified path object. |
Path |
suffix(java.lang.String suffix)
Adds a suffix to the final name in the path. |
java.lang.String |
toString()
|
java.net.URI |
toUri()
Convert this to a URI. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String SEPARATOR
public static final char SEPARATOR_CHAR
public static final java.lang.String CUR_DIR
Constructor Detail |
---|
public Path(java.lang.String parent, java.lang.String child)
public Path(Path parent, java.lang.String child)
public Path(java.lang.String parent, Path child)
public Path(Path parent, Path child)
public Path(java.lang.String pathString)
public Path(java.net.URI aUri)
public Path(java.lang.String scheme, java.lang.String authority, java.lang.String path)
Method Detail |
---|
public java.net.URI toUri()
public boolean isUriPathAbsolute()
public boolean isAbsolute()
public java.lang.String getName()
public Path getParent()
public Path suffix(java.lang.String suffix)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public int depth()
public Path makeQualified(java.net.URI defaultUri, Path workingDir)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |