public class ArtefactPathImpl extends Object implements ArtefactPath
Only absolute paths are supported now.
| Modifier and Type | Field and Description |
|---|---|
static char |
SEGMENT_DELIMITER |
| Constructor and Description |
|---|
ArtefactPathImpl(ArtefactPath artefactPath) |
ArtefactPathImpl(List<String> segments) |
ArtefactPathImpl(String pathAsString) |
ArtefactPathImpl(String[] segments) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addSegment(String segment) |
protected void |
appendToSegments(String pathAsString) |
protected Object |
clone() |
boolean |
equals(Object obj) |
Collection<String> |
getSegments()
Gets the path as a collection of segments.
|
String |
getStringValue()
Gets the path as a single string.
|
String |
getStringValue(int skip)
Gets the path as a single string, omitting first
skip
elements. |
int |
hashCode() |
String |
segment(int index)
Gets a segment in the path.
|
int |
segmentCount()
Returns number of segments in the path
|
ArtefactPath |
withoutFirstSegment()
Create new instance of ArtefactPath from base one, excluding first
segment of base path.
|
ArtefactPath |
withoutSegment(int segmentIndex) |
ArtefactPath |
withSegment(String segment)
Creates new instance of ArtefactPath from base one, adding one more
segment.
|
public static final char SEGMENT_DELIMITER
public ArtefactPathImpl(ArtefactPath artefactPath)
public ArtefactPathImpl(String[] segments)
public ArtefactPathImpl(String pathAsString)
protected void addSegment(String segment)
protected void appendToSegments(String pathAsString)
public Collection<String> getSegments()
getSegments in interface ArtefactPathpublic String getStringValue()
getStringValue in interface ArtefactPathpublic String getStringValue(int skip)
ArtefactPathskip
elements. All segments are concatenated by special delimiter '/'.getStringValue in interface ArtefactPathskip - number of elements to skippublic String segment(int index)
segment in interface ArtefactPathindex - position of segment in the pathpublic int segmentCount()
segmentCount in interface ArtefactPathpublic ArtefactPath withoutFirstSegment()
ArtefactPathwithoutFirstSegment in interface ArtefactPathpublic ArtefactPath withoutSegment(int segmentIndex)
withoutSegment in interface ArtefactPathpublic ArtefactPath withSegment(String segment)
ArtefactPathwithSegment in interface ArtefactPathsegment - adding segmentCopyright © 2018. All rights reserved.