public abstract class SimplePath extends Object implements Path
Simple implementation of a Path.
| Constructor and Description |
|---|
SimplePath(String n,
DirectoryPath dp)
Builds a new instance based on a given name and a parent directory.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAbsolutePath()
Returns the absolute path of this path by separating each parent path with a standard
separator. |
String |
getName()
Returns the path name.
|
DirectoryPath |
getParent()
Returns the parent path.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLastUpdatepublic SimplePath(String n, DirectoryPath dp)
Builds a new instance based on a given name and a parent directory.
n - the namedp - the parentpublic String getName()
Returns the path name.
public DirectoryPath getParent()
Returns the parent path. Should be null if this path is considered as a root.
public String getAbsolutePath()
Returns the absolute path of this path by separating each parent path with a standard
separator.
getAbsolutePath in interface PathCopyright © 2012-2015. All Rights Reserved.