| Constructor and Description | 
|---|
| PathImpl()
 Creates 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. | 
| boolean | equals(Object obj) | 
| 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. | 
| int | hashCode() | 
| static Path | parsePath(String path)
 Parses the specified path. | 
public Path getParentPath()
PathReturns the path of the parent.
 If this path is /usr/local this method will return the path
 /usr.
 
getParentPath in interface Pathnull, if the path doesn't have a parent.public Path getChildPath()
PathReturns the path of the child.
 If this path is /usr/local this method will return the path
 /local.
 
getChildPath in interface Pathnull, if the path doesn't have a child.public Path createChild(String name)
PathCreates 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.
 
createChild in interface Pathname - The name of the child.public String getFirstElement()
PathReturns the first element of the path.
getFirstElement in interface Pathnull, if this path represents
         the root path.public String getLastElement()
PathReturns the last element of the path.
getLastElement in interface Pathnull, if this path represents
         the root path.public String getAbsolutePath()
PathReturns the path as string.
getAbsolutePath in interface Pathpublic static Path parsePath(String path)
Parses the specified path.
path - The path as string.IllegalArgumentException - If the path is null.Copyright © 2015–2019. All rights reserved.