static final class Paths.MultiSegmentPath extends Object implements Path, Paths.InnerPath
Path.Segments| Modifier and Type | Field and Description |
|---|---|
private int |
hc |
private String[] |
segments |
| Modifier | Constructor and Description |
|---|---|
protected |
MultiSegmentPath(String[] segments) |
| Modifier and Type | Method and Description |
|---|---|
Path |
append(Path relPath)
Create a new path consisting of this path appended with the given path that will be treated as a relative path.
|
int |
copyInto(String[] segments,
int start) |
boolean |
equals(Object obj) |
void |
forEach(Consumer<? super String> consumer) |
int |
hashCode() |
Iterator<String> |
iterator() |
Optional<String> |
lastSegment()
Get the last segment, if there is one.
|
Optional<Path> |
parent()
Get the optional parent path.
|
String |
segment(int index)
Get the segment at the given index.
|
int |
size()
Get the number of segments in the path.
|
Path |
subpath(int length)
Get a portion of this path that has a specified number of segments.
|
String |
toRelativePath()
Obtain the representation of this path as a relative path without the leading '/'.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitappend, fromRoot, isMultiple, isRoot, isSingle, optionalRoot, parse, parse, rootspliteratorprivate final String[] segments
private final int hc
protected MultiSegmentPath(String[] segments)
public Optional<Path> parent()
Pathpublic Optional<String> lastSegment()
PathlastSegment in interface Pathpublic int size()
Pathpublic String toRelativePath()
PathtoRelativePath in interface Pathpublic Path subpath(int length)
Pathpublic String segment(int index)
Pathpublic Path append(Path relPath)
Pathpublic int copyInto(String[] segments, int start)
copyInto in interface Paths.InnerPathCopyright © 2018 JBoss by Red Hat. All rights reserved.