public interface Path
A path.
Modifier and Type | Method and Description |
---|---|
Path |
createChild(String name)
Creates the specified child for this path and returns it as a new path.
|
String |
getAbsolutePath()
Returns the path as string.
|
Path |
getChildPath()
Returns the path of the child.
|
String |
getFirstElement()
Returns the first element of the path.
|
String |
getLastElement()
Returns the last element of the path.
|
Path |
getParentPath()
Returns the path of the parent.
|
Path getParentPath()
Returns the path of the parent.
If this path is /usr/local
this method will return the path
/usr
.
null
, if the path doesn't have a parent.Path getChildPath()
Returns the path of the child.
If this path is /usr/local
this method will return the path
/local
.
null
, if the path doesn't have a child.Path createChild(String name)
Creates the specified child for this path and returns it as a new path.
If this path is /usr
and the name of the child is
local
the returned new path will be /usr/local
.
name
- The name of the child.IllegalArgumentException
- If the name is null
.String getFirstElement()
Returns the first element of the path.
null
, if this path represents
the root path.String getLastElement()
Returns the last element of the path.
null
, if this path represents
the root path.String getAbsolutePath()
Returns the path as string.
Copyright © 2015–2019. All rights reserved.