public abstract static class Path.Extender extends Object
CanonicalPath.Builder or RelativePath.Builder provide compile-time-safe canonical path
construction, this class provides the same behavior at runtime, throwing IllegalArgumentExceptions if
the segments being added to a path are invalid in given context.| Modifier and Type | Method and Description |
|---|---|
boolean |
canExtendTo(Path.Segment segment)
Checks whether this path can be extended with the provided segment.
|
Boolean |
canExtendTo(SegmentType segmentType)
Checks whether this path can be extended by a segment of the provided type.
|
Path.Extender |
extend(Collection<Path.Segment> segments) |
Path.Extender |
extend(Path.Segment segment) |
Path.Extender |
extend(SegmentType type,
String id) |
Path |
get() |
protected abstract Path |
newPath(int startIdx,
int endIdx,
List<Path.Segment> segments) |
protected void |
removeLastSegment() |
protected abstract Path newPath(int startIdx, int endIdx, List<Path.Segment> segments)
public Boolean canExtendTo(SegmentType segmentType)
segmentType - the type of the next segmentpublic boolean canExtendTo(Path.Segment segment)
segment - the segment to extend the path withpublic Path.Extender extend(Path.Segment segment)
protected void removeLastSegment()
public Path.Extender extend(Collection<Path.Segment> segments)
public Path.Extender extend(SegmentType type, String id)
public Path get()
Copyright © 2014–2016 Red Hat, Inc.. All rights reserved.