@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, toUriPath
protected String[] rootAndNames(String path)
PathElementsFactory
This 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 PathElementsFactory
path
- the pathprotected String[] splitNames(String names)
PathElementsFactory
The 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 PathElementsFactory
names
- the input stringprotected boolean isValidName(String name)
PathElementsFactory
isValidName
in class PathElementsFactory
name
- the name to checkprotected boolean isSelf(String name)
PathElementsFactory
isSelf
in class PathElementsFactory
name
- the name to checkPathElementsFactory.normalize(PathElements)
protected boolean isParent(String name)
PathElementsFactory
isParent
in class PathElementsFactory
name
- the name to checkPathElementsFactory.normalize(PathElements)
protected boolean isAbsolute(PathElements pathElements)
PathElementsFactory
PathElements
represents an absolute pathisAbsolute
in class PathElementsFactory
pathElements
- the instance to checkPath.isAbsolute()
public PathElements getRootPathElements()
getRootPathElements
in class PathElementsFactory