@ParametersAreNonnullByDefault public final class UnixPathElementsFactory extends PathElementsFactory
PathElementsFactory for Unix-like pathsNO_NAMES, parentToken| Constructor and Description |
|---|
UnixPathElementsFactory() |
| Modifier and Type | Method and Description |
|---|---|
PathElements |
getRootPathElements() |
protected boolean |
isAbsolute(PathElements pathElements)
Check whether a
PathElements represents an absolute path |
protected boolean |
isParent(String name)
Check whether a name element represents the parent directory
|
protected boolean |
isSelf(String name)
Check whether a name element represents the current directory
|
protected boolean |
isValidName(String name)
Check whether a name element is valid
|
protected String[] |
rootAndNames(String path)
Split an input path into the root component and all name elements
|
protected String[] |
splitNames(String names)
Split a names-only input into individual name elements
|
getSeparator, normalize, relativize, resolve, resolveSibling, toPathElements, toString, toUriPathprotected String[] rootAndNames(String path)
PathElementsFactoryThis method returns a two-element string array, where the first element is the root component and the second element is a string with all name elements and any trailing characters (if any) removed.
If the path has no root, the first element of
the returned array must be null.
rootAndNames in class PathElementsFactorypath - the pathprotected String[] splitNames(String names)
PathElementsFactoryThe input is guaranteed to be well-formed (no root component, no root separator and no trailing characters). The name elements must be in their order of appearance in the input.
splitNames in class PathElementsFactorynames - the input stringprotected boolean isValidName(String name)
PathElementsFactoryisValidName in class PathElementsFactoryname - the name to checkprotected boolean isSelf(String name)
PathElementsFactoryisSelf in class PathElementsFactoryname - the name to checkPathElementsFactory.normalize(PathElements)protected boolean isParent(String name)
PathElementsFactoryisParent in class PathElementsFactoryname - the name to checkPathElementsFactory.normalize(PathElements)protected boolean isAbsolute(PathElements pathElements)
PathElementsFactoryPathElements represents an absolute pathisAbsolute in class PathElementsFactorypathElements - the instance to checkPath.isAbsolute()public PathElements getRootPathElements()
getRootPathElements in class PathElementsFactory