@NotThreadSafe public class PathSplitter extends Object
| Constructor and Description |
|---|
PathSplitter(char separatorChar,
boolean keepTrailingSeparator)
Constructs a new splitter.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getMemberName()
Returns the member name.
|
String |
getParentPath()
Returns the parent path name.
|
PathSplitter |
split(String path)
Splits the given path name into its parent path name and member name.
|
public PathSplitter(char separatorChar,
boolean keepTrailingSeparator)
separatorChar - the file name separator character.keepTrailingSeparator - whether or not a parent path name
should have a single trailing separator if present in the
original path name.public String getMemberName()
@Nullable public String getParentPath()
public PathSplitter split(String path)
C:\ on
Windows.path - the path name which's parent path name and member name
are to be returned.thisCopyright © 2012–2018 Schlichtherle IT Services. All rights reserved.