public interface PathContainer
Structured representation of a URI path parsed via
parsePath(String)
into a sequence of PathContainer.Separator and PathContainer.PathSegment elements.
Each PathContainer.PathSegment exposes its content in decoded form and with path
parameters removed. This makes it safe to match one path segment at a time
without the risk of decoded reserved characters altering the structure of
the path.-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic interfaceA path element, either separator or path segment.static classOptions to customize parsing based on the type of input path.static interfacePath segment element.static interfacePath separator element. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungelements()The contained path elements, eitherPathContainer.SeparatororPathContainer.PathSegment.static PathContainerstatic PathContainerparsePath(String path, PathContainer.Options options) Parse the path value into a sequence ofSeparatorandPathSegmentelements.default PathContainersubPath(int index) Extract a sub-path from the given offset into the elements list.default PathContainersubPath(int startIndex, int endIndex) Extract a sub-path from the given start offset into the element list (inclusive) and to the end offset (exclusive).value()The original path from which this instance was parsed.
-
Methodendetails
-
value
String value()The original path from which this instance was parsed. -
elements
List<PathContainer.Element> elements()The contained path elements, eitherPathContainer.SeparatororPathContainer.PathSegment. -
subPath
Extract a sub-path from the given offset into the elements list.- Parameter:
index- the start element index (inclusive)- Gibt zurück:
- the sub-path
-
subPath
Extract a sub-path from the given start offset into the element list (inclusive) and to the end offset (exclusive).- Parameter:
startIndex- the start element index (inclusive)endIndex- the end element index (exclusive)- Gibt zurück:
- the sub-path
-
parsePath
- Parameter:
path- the encoded, raw path value to parse- Gibt zurück:
- the parsed path
-
parsePath
Parse the path value into a sequence ofSeparatorandPathSegmentelements.- Parameter:
path- the encoded, raw path value to parseoptions- to customize parsing- Gibt zurück:
- the parsed path
-