public abstract class AbstractDirectoryPath extends SimplePath implements DirectoryPath
Abstract implementation of a DirectoryPath
. Subclasses just need to implement the
buildChild(String)
method.
Constructor and Description |
---|
AbstractDirectoryPath(String name,
DirectoryPath parent)
Builds a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Path |
buildChild(String child)
Builds the path corresponding to the given direct child name of this directory.
|
Path |
getChild(String path)
Gets the
Path corresponding to the given String which should be interpreted relatively to
this directory. |
getAbsolutePath, getName, getParent, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
list
getAbsolutePath, getLastUpdate, getName, getParent
public AbstractDirectoryPath(String name, DirectoryPath parent)
Builds a new instance.
name
- the nameparent
- the parentpublic Path getChild(String path) throws IOException
Gets the Path
corresponding to the given String
which should be interpreted relatively to
this directory.
getChild
in interface DirectoryPath
path
- the path representing the child relatively to this directoryIOException
- if any I/O error occursprotected abstract Path buildChild(String child) throws IOException
Builds the path corresponding to the given direct child name of this directory.
child
- the child nameIOException
- if any I/O error occursCopyright © 2012-2015. All Rights Reserved.